Shopify App CLI Heroku -- page unresponsive - heroku

I created my app with Shopify CLI "shopify create" (Node.js app) and deployed it to Heroku (shopify deploy). I already add my .env variables (scopes ,SHOPIFY_API_KEY, SHOPIFY_SECRET_KEY, host, shop) to my heroku config Vars, and I changed my app url to https://MY-URL.herokuapp.com/ , and the whitelisted redirect urls to https://MY-URL.herokuapp.com/auth/callback
When trying to open the app in my dev store, the interface is shown correctly (see image below)
However, the interface is unresponsive. So e.g. I can not press the button or select the text with mouse. (actually I can not do any mouse actions at all)
I have no idea what could cause this unresponsiveness.
Further info:
If i open https://MY-URL.herokuapp.com/ in browser, Safari says "Safari cant find the server, "https:undefined/admin/oauth/authorize?...",
Chrome says "
This site can’t be reached
Check if there is a typo in undefined.
DNS_PROBE_FINISHED_NXDOMAIN"
I deployed the app a few hours ago (~4 hours) .
Thank you in advance, any help is appreciated.

Related

Heroku pipeline app returns 404: "no such app"

I created three apps in Heroku and added them to a pipeline, but their URLs return a 404.
The apps are named like "app-name-dev", "app-name-stage", and "app-name". On the settings tab of each app, Heroku has given them auto-generated URLs, like "https://app-name-dev.herokuapp.com/", etc. But only the production URL works (the one not ending in -dev or -stage). The other 2 return 404 with the title "no such app".
Anyone know how to get Heroku pipeline apps to load in the browser? My code runs fine -- no errors -- because the production site loads fine. It's just -dev and -stage that won't load. Again, they're at default URLs assigned by Heroku -- no custom domains.
Thanks.
Duh, all I had to do was wait a few hours for some DNS entries to be updated somewhere. All 3 apps are loading now.

URL for Settings>Privacy>Location Services in iOS 11+?

If locationServicesEnabled() == false, I'm prompting the user to enable their Location Services. The following URL works for 10.0+, redirecting the user to the Settings app and directly to the Location Services screen:
URL(string: "App-Prefs:root=Privacy&path=LOCATION")
However this doesn't work in iOS 11. It opens the Settings app, but doesn't drill down to the Location Services. Anyone knows what's the new URL for iOS 11+?
I am experiencing the same issue since the first beta releases. I've tested a lot of different schemas but none of them worked properly. In the first releases opening schemas would redirect to the home screen but they already fixed that.
Open Location Services:
If this app is for personal use only and you do not plan to submit it to the App Store, then you should be ok to use the following. Otherwise, if you do plan to release your app, Apple will reject it upon review. Code is:
UIApplication.shared.open(URL(string: "App-prefs:LOCATION_SERVICES")!)

Google API authentication: Not valid origin for the client

When making an auth request to the Google API (gapi), it's returning false on the checkOrigin.
I have removed any client id's or anything that would link directly to my account and replaced it with a regex indicating what the data is for reference.
Url: https://accounts.google.com/o/oauth2/iframerpc?action=checkOrigin&origin=https%3A%2F%2Flocal.tools&client_id=(\d{21})
My origin url is a local url, which is https://local.tools
Result: {valid: false}
I'm using the example found here without deviation (except for replacing clientid with my 21 digit clientid): https://ga-dev-tools.appspot.com/embed-api/third-party-visualizations/
The items I'm trying to display show up nicely on the demo site, but aren't getting past the Not valid origin for the client error on my local.tools site.
Clear your browser cache. Started getting this error in Chrome and then I created a new client id and was still getting the issue. Opened firefox and it worked, so I cleared the cache on Chrome and it started working.
I received the same console error message when working with this example: https://developers.google.com/analytics/devguides/reporting/embed/v1/getting-started
The documentation says not to overlook two critical steps ("As you go through the instructions, it's important that you not overlook these two critical steps:
Enable the Analytics API [&] Set the correct origins"), but does not clearly state WHERE to set the correct origins.
Since the client ID I had was not working, I created a new project and a new client ID. The new project may not have been necessary, but I'm retaining (and using) it.
Here's what worked:
Create a new project
Add and Enable the Analytics API
Create a new credential - ensure that it is an OAUTH credential (scroll to the bottom of this page for instructions https://developers.google.com/api-client-library/javascript/start/start-js#Setup).
During creation of the credentials, you will see a section called "Restrictions
Enter JavaScript origins, redirect URIs, or both". This is where you can enter your origins.
Save and copy your client ID (and secret).
My script worked after I created the new OAUTH credential, assigned the origin, and used the newly generated client ID following this process.
try clear caches and then hard reload, i had same error but when i tried to run on incognito browser in chrome it worked.
Key Point: Add both http://localhost and http://localhost:port_number to the Authorized JavaScript origins box for local tests or development.
Credentials do not work if API is not enabled. In my case the next steps were needed:
Go to https://console.developers.google.com/apis/library
Enter 'People'
From the result choose 'Google People API'
Click 'Enable'
Creating new oauth credentials worked for me
You probably use Client ID like this: <CLIENT_ID>.apps.google.com
Make sure your client ID is without ".apps.google.com"
For me - I just went here:
https://console.developers.google.com/apis/credentials
Then chose the right project; then choose the credential with the same ID shown in your console error message. When editing the credentials you can add multiple origins to the white list.
After updated Authorized JavaScript origins browser still caching old data, so I need to Empty cache and hard reload then it works
1. Change Authorized origins
2. Open Dev Tool (F12) then right-click into reload button
Clearing the cache on chrome works!
Please find the steps below to clear the cache.
Open dev tools (Right-click on the page and select inspect/ press F12)
Right-click on the chrome reload button while the dev tool is opened. (You will find the option to clear the cache and reload the site)
clearing the cache works for me.
for React developers try to restart the project otherwise it will show the same error again and again.
It was a referrer-policy problem.
This has been such a pain for a long time to me too...
Found the issue, my website instance had a referrer policy set to
no-referrer. After setting it to no-referrer-when-downgrade, the One
Tap prompt showed up as expected.
https://stackoverflow.com/a/63039142/15565029
If you are using Django, SECURE_REFERRER_POLICY is 'same-origin' by default. Change it by adding the below code in your settings file.
# settings.py
SECURE_REFERRER_POLICY = 'no-referrer-when-downgrade'
https://docs.djangoproject.com/en/3.2/ref/settings/#std:setting-SECURE_REFERRER_POLICY
Similar to few answers at above but with screenshots. If you created project for Firebase, may also use the same steps to configure at Google Cloud Platform console.
Select the project at https://console.cloud.google.com/
Navigate to Credentials
Click Edit button for the related OAuth 2.0 Client ID
Add URI into Authorized JavaScript origins
Don't forget to Save
That worked for me after trying for an hour:
On https://console.cloud.google.com/apis/credentials :
Edit Client Outh (mine was: Web Client (Auto Created by Google Service), which was created by my Firebase Web Project)
Enter JavaScript Origin for the Client ID (mine was: localhost:NNNN)
and don't forget to Save.
Try google login for half an hour: didn't work
Enabled Google Analytics as suggested above
Empty Chrome cache and hard reload as suggested above
Try google login for half an hour: didn't work
Sign Out from https://console.cloud.google.com, and sign in again
Empty Chrome cache and hard reload
Now it worked
I don't know which one of the above fixed the problem.
May be it was just a matter of time for cloud.google to
recognize my new JavaScript Origin.
I got the error because of Allow-Control-Allow-Origin: * browser extension.
Trying on a different browser(chrome) worked for me and clearing cache on firefox cleared the issue.
(PS: Not add the hosting URIs to Authorized JavaScript origins in API credentials would give you Error:redirect_uri_mismatch)
I was getting the same error but tried publishing my app and now it shows as below:

Unable to find deployed app. "Parse App not found" error in parseapp.com app URL

Learning about Parse.com. I've deployed the initial code via the parse command-line about an hour ago. When I go to my app's URL, I get a "Parse App not found" 404 page.
Just created a new app and deployed it for debugging purposes. The name of the app is oct15test.
When I visit https://oct15test.parseapp.com/ I get:
Any ideas?
Looks like you did not setup the subdomain for the app. Go to https://www.parse.com/apps/oct15test/edit#hosting and pick a subdomain there, should work just fine after that.

Heroku error logs without heroku command

How can I check the error logs of Heroku,
without running:
heroku logs
Since I'm using Codeship.io, I can't use 'heroku' commands
There is a free heroku add on, Papertrail.
And this to your heroku app (can be done command line or via the heroku UI)
then on your Resources tab you can click Papertrail.
Helpfull note with Papertaril, you can set up email notifications on string comparisons. This can help for early fault detection.
If you have access to the heroku app you could view the logs from there:
(open the app page then press the dotted more button on the top right then press view logs)
(requires you to keep the logs page open)
logs one
logs two
or set up a webhook
(open the app page then press the dotted more button on the top right then press view webhooks and once the page has loaded click create webhook then set-up your webhook)
(i use it with discord: Ohttps://support.discordapp.com/hc/en-us/articles/228383668-Intro-to-Webhooks)
(may not have an error option)
webhooks one
webhooks two
webhooks three
or like gregmcpugh said you could use the add on papertrail. (which i also use)
There is a free heroku add on, Papertrail.
And this to your heroku app (can be done command line or via the heroku UI) then on your Resources tab you can click Papertrail.
Helpful note with Papertrail, you can set up email notifications on string comparisons. This can help for early fault detection.
(no bad thing i can say about this one!)
papertrail one
papertrail two
papertrail three
damn people being before me :P
hope i helped! :D

Resources