Can't put onesignal service worker js files in root in github - github-pages

I have used github-pages to publish my site. I'm trying to use onesignal there. But I can't store the sdk files in the root. I'm getting this console error.
Installing service worker failed TypeError: Failed to register a ServiceWorker for scope ('https://username.github.io/') with script ('https://username.github.io/OneSignalSDKWorker.js?appId=<MY_APP_ID>'): A bad HTTP response code (404) was received when fetching the script.

A 404 means the service worker script is not where the SDK thinks it is. Try visiting the URL in your browser (https://username.github.io/OneSignalSDKWorker.js). You should see the script there. If it is not there, you have not successfully hosted the required file.

Related

When trying to deploy my nodejs code to gcloud, the url I am deploying to gives a 502 error

First, when trying to deploy my code to the target url in gcloud, the deployment process hangs.
The target url has the suffix appspot.com.
When I ping the target url, I get a request timeout. When I type the target url in my browser, I get a 502 error: server error.
When I deployed the same code to a different test environment in dialogflow, everything seemed to work fine. However when I try deploying again to this url (it is the correct url obtained from the webhook fulfilment url in dialogflow), I get this error:
Updating service [default] (this may take several minutes)...failed.
ERROR: (gcloud.app.deploy) Error Response: [4] Timed out waiting for
the app infrastructure to become healthy.
Everything else, including the node js code and the dialogflow configurations are the same between the two environments I am deploying to, except for the webhook fulfilment url.
Does anyone know what the issue can be narrowed down to? And please let me know if I can include any more useful information.
My guess is that the server is down for that specific URL. One thing to note is that I am using V1 dialogflow.
Resolved, it ended up being a firewall issue for that specific url.

How to submit a job, by using an uploaded jar in Apache Flink?

I've already uploaded a jar (which was generated through a word count java program) to Apache Flink web console through an HTTP Post request via curl and the get jars api shows the uploaded jar.
When I try to submit a job using that jar, it throws me this error:
Caused by: org.apache.flink.client.program.ProgramInvocationException:
JAR file does not exist
'/tmp/flink-web-8aa36f99-87fb-4fbc-b155-237fd833fc32/:949611ce-345a-4cd5-986b-8ff9b0700852_WordCount.jar'
This is how my POST request looks like:
http://localhost:8081/jars/:949611ce-345a-4cd5-986b-8ff9b0700852_WordCount.jar/run
I followed their official docs for reference. Where am i going wrong? Any help could be appreciated.
Ensure that the jar file is located in your temp directory. There is a ':' in path, is it correct?
I study REST API recently and successfully submit my job with POST request
http://host:port/jars/29525e98-3ece-49c1-85d1-5301a5a38900_myjob.jar/run?allowNonRestoredState=false&entry-class=&parallelism=&program-args=&savepointPath=
Also you can submit job via Flink Dashboard and detect correct url through Chrome DevToos at Network tab (or something like this)

H18 Error: Django app Media Upload failing on Heroku

Our Django App is failing media upload. This has been an off-and-on issue for us for a while. however, for about a week now, it's been consistently failing to upload media. Our media files are stored on S3.
On inspection, the uploaded files were found in the S3 buckets... However, the logs display the message below while the app throws an Application error...
Found this answer on GitHub (https://github.com/benoitc/gunicorn/issues/840)
Hi, we hit this issue in production using Flask + Gunicorn + Heroku and couldn't find a cause or a workaround.
For one particular POST request with POST parameters, the request would fail with an H18 error (sock=backend) in Heroku's router indicating that the server closed the socket when it shouldn't have.
We started decreasing the response size of that failing endpoint until we narrowed it down to around the 13k mark. If we sent less than 13k, the response would always work. If we sent more than 13k, the response would almost always not work.
Code to reproduce this is available at https://github.com/erjiang/gunicorn-issue - just deploy the repo to Heroku as is and follow the instructions in the README.

Azure Web Site with Django 500 Error

I've spent over 8 hours trying to get this Django site up and running on an Azure Website. I've nearly thrown in the towel would really appreciate some help.
So far I have tried numerous methods and followed different tutorials, but they have all yielded the same result. Here is the most recent tutorial I have followed: http://www.windowsazure.com/en-us/develop/python/tutorials/web-sites-with-django/
Now that my site is "up", I am seeing a 500 error for all requests. Here is the error in the log:
The page cannot be displayed because an internal server error has occurred.
Most likely causes:
IIS received the request; however, an internal error occurred during
the processing of the request. The root cause of this error depends on which mo
dule handles the request and what was happening in the worker process when this
error occurred. IIS was not able to access the web.config file for t
he Web site or application. This can occur if the NTFS permissions are set incor
rectly. IIS was not able to process configuration for the Web site o
r application. The authenticated user does not have permission to u
se this DLL. The request is mapped to a managed handler but the .
NET Extensibility Feature is not installed.
Things you can try:
Ensure that the NTFS permissions for the web.config file are correct
and allow access to the Web server's machine account. Check the ev
ent logs to see if any additional information was logged. Verify the p
ermissions for the DLL. Install the .NET Extensibility feature if th
e request is mapped to a managed handler. Create a tracing rule to tra
ck failed requests for this HTTP status code. For more information about creatin
g a tracing rule for failed requests, click here.
Please help!
I got it working by settings up a new django project from the azure gallery and changed some configs and such.
Edit: The configs I updated was just the name of my app. In my case I also updated the database config with the database I wanted to use in settings.py.
The lesson learned from this is that it is easier to initialize the app from Azure's "Create from gallery" feature, and then pull down the source and modify it via ftp or git to achieve the desired project structure/naming.

recieving error The file you are attempting to save or retrieve has been blocked from this Web site by the server administrators.<nativehr>0x800401e6

After building and deploying, checked the solution management from Central administration and it's up, a simple web service method that only created a Document Library list with a few columns when trying to retrieve the wsdl or even just by calling the WS fromt the adress since its a void method I recieve some error:
The file you are attempting to save or retrieve has been blocked from this Web site by the server administrators.<nativehr>0x800401e6</nativehr><nativestack></nativestack>
The very same method runs fine when called from another web service project that is already deployed so there's nothing wrong with the code. I'm most probably doing something wrong but can't figure.
The system is running on a win server 2008 with sharepoint 2010, framework 3.5 and "ANY" cpu mode.
thank you!
[edit]
Managed to get rid of the previous error by removing asmx extention from the blocked file list in central administration now instead I'm recieving a 404 error:
The resource cannot be found.
Description: HTTP 404. The resource you are looking for (or one of its dependencies) could have been removed, had its name changed, or is temporarily unavailable. Please review the following URL and make sure that it is spelled correctly.
Requested URL: /_layouts1/my2claims/tt_claims.asmx
it must run under the same application pool as SharePoint