Chrome Packaged App TOKEN_MISSING_ERROR - in-app-purchase

I have a Chrome packaged application that I am testing to add in-app purchases. When running the application from my own account querying getSkuDetails works fine. However, when running it from another test account, it returns TOKEN_MISSING_ERROR. I cannot find any google developer documentation to help me progress this. Has anyone come across this?

I discovered that this problem is related to the Chrome browser not being logged in. I ran into this same issue on my test machine's Chrome browser, however, after I logged Chrome into my Google Account, it returned success and I could also open the buy window.

Related

Can't Authorize when i try to login to my django project from iphone

I have created a website using Django (Django-rest-framework, django-rest-knox), ReactJS and redux together. I have run the server from 0.0.0.0:8000 to reach the project from my iPhone and test there. The Website has been loaded however when I try to log in, it can not authorize and gives 401 error. On the other hand, I can authorize without any problem from browsers on PC (chrome, opera, firefox etc.) and android devices.
I have also installed Opera Mini to my iPhone and, again I couldn't authorize it. I don't know which part of my code I have share. I also couldn't find any information about this issue. I would be glad if anyone can help me.

Chrome Service Worker iOS Support

As Apple announced Service Worker support for iOS 11.3 a few months ago, I recently started trying to get a service worker to work on iOS. On Safari it works as expected, after vising the website, it works offline. However, when trying to use the same feature in Chrome, I had intermittent results. Specifically, the service worker would only work every other page refresh, with the original refresh after going offline being one of the ones not working.
I know that Chrome on iOS is built on a version of Safari, therefore I am confused about this behavior.
Is this due to incomplete support from Chrome iOS for Service Workers? Because it is Chrome on iOS, I'm not sure of any easy way to debug it either, so any other tips to help track down the problem would be appreciated. Thank you!
Chrome for iOS do not support service workers currently(as of Apr-2020) and also the "Add to home screen" option is not available, if you are interested in that. Any offline page loading that you are experiencing should be from regular browser cache.
Here is an official documentation from Apple's web-kit page.
Update: A previous version of this post stated the Service Worker API
is available in all applications using WKWebView. At this time it is
only available in Safari, applications that use
SFSafariViewController, and web applications saved to your home
screen.
Notably, Chrome uses WKWebView as its browser engine in iOS, which don't have service worker support yet as per the above statement(which you can find in the link provided above). So the only way you can use Service worker in iOS is to use Safari browser or use one of the above supported web-views inside a native app.
Here is an article on what all PWA features iOS is still missing. Remember, this is a fast growing area. Always check if what is applicable now, especially if the documentation/article is getting older.
Here is an adapter to help debug in Chrome dev tools for pages loaded iOS - webkit/safari. Hope it becomes as easy as Android Chrome debugging one day!
Chrome for iOS is open source (https://blog.chromium.org/2017/01/open-sourcing-chrome-on-ios.html)
We can install the Chrome app with our developer signed certificate on an iOS device, launch the Chrome App, and start testing.
It is technically feasible.
As an update in January 2021: the official documentation from Apple's web-kit page still says the same thing, and I just battled a very difficult to debug issue in Chrome iOS - posting here in case it helps someone.
I had an iFrame containing a cross-origin Angular 10 PWA with Service Worker enabled, and the iFrame content would not show after an initial load - no errors, no server logs, just blank. The only solution that worked was to self-destruct the Service Worker per Angular's docs, and now the iFrame loads fine.

Issue with PWA on iOS 113

I have a PWA that I've been using perfectly till I updated my phone to 11.3 (introduce Service Workers supports, so in my iPhone it was only a bookmark) and all worked like a charm.
After I've updated to iOS 11.3 I wasn't able to enter to my app because I have an external login (in other domain) so each time I try to open my open this will open a safari browser to make the auth. Before PWA in iOS the external URLs were open in the same open (without open safari). Do you know if this is the correct behavior and, if it is ok, how can I fix it?
Thanks!
I managed to fix this by removing the manifest meta tag:
<link rel="manifest" href="/tracker/site.webmanifest">
My project is a simple PWA that uses Google's OAuth for login. I was getting redirected to Safari to login and unable to go back to the app (on my home screen). Hope it works for you too, I wasted 2 days trying to find a solution.
The reply by Anand tells me that offline capable PWAs need to implement service workers, since they are supported in 11.3 (or 11.4, not sure) and NOT manifests.
Anyways, this worked for me, hope it helps others as well.
When PWAs without service works(either your browser don't support it or your app don't have one) are added to home screen, its mere a bookmark. When the browser finds a SW, then it creates a package(like apk).
How to test this - Find a PWA site without service worker in android and add to home screen. When I tried it in one of Samsung device, it showed only "Remove" option and no uninstall option. When I added a PWA which had SW, got uninstall option. I was also able to locate the apk generated by Chrome when service worker is present.
Now on iOS - 3 possibilities I could think of.
1) My theory based on above behavior on PWAs with and without Service worker, your home icon create by iOS 11.2.x is a bookmark and the new version of safari is treating it as a bookmark to open it in browser. I couldn't test this as I've upgraded to 11.3 already and don't have a pre 11.3 PWA icon.
2) If you have reinstalled the icon(by removing and adding again to home screen) and still have the issue, its probably because your manifest file or service worker files have some issue/compatibility with Safari.
Since we don't have something like Lighthouse for safari, you can validate your manifest.json and service workers in Chrome Lighthouse.
3) Check on scope attribute in the manifest file to make sure you cover your entire domain you intent to cover. If you scope covers domain.com/myapp only, domain.com/otherapp will be opened in the browser when tried to open from any source.
It seems that with the last iOS version 11.4 this issue is solved, I think that now safari shares the context between the browser and the PWA and for example from PWA cookies can be accessed throw safari.
But I think there's still an issue when you open the PWA and you are being redirect to login (safari opens) once you're log in you stay in the browser (iOS does not return to the PWA, but this is a first step)

Does AppLinks Work With an Ad Hoc iOS Install

I am using iOS 9.3.3 and have the latest version of Facebook installed.
I have my app installed under the Ad Hoc provision. I have tested my URI scheme with plain links in safari and my app opens perfect and deep links how I want.
However when I try a link in the Facebook App it never opens my App, just loads the page in the Facebook webView. I have double checked my meta tags via https://developers.facebook.com/tools/debug/og/object/ I can see all the needed meta tags are there e.g. al:ios:url, al:ios:app_store_id, al:ios:app_name and correct URI scheme supplied.
I have tried setting the web fallback option to false:
<meta property="al:web:should_fallback" content="false" />
Now when I click the link inside the Facebook app I get an install app prompt even though I have the app installed (under Ad Hoc). Which begins to make me think Facebook thinks it's not installed as it's an Ad Hoc install and not from the app store?
If I go to the App Store it also says install, not open etc.
Can we test with Ad Hoc installs? I am going a bit mad with trial and error debugging, but obviously want to check if it should or should not work with an Ad Hoc install before I just chance it and publish to the App Store.
Has anyone had experience with this? Or is something majorly wrong perhaps.
Just to note, I have it fully working with the Android version of my App.
Welcome to the world of Facebook :). You've got it exactly right: Facebook has completely broken their own AppLinks standard on iOS, and there have been multiple open bugs about it for many months. It still works on Android currently, but that's about the only place.
The best workaround currently is to open the webview (as you are doing) and then allow the user to trigger the app deep link from within there. At Branch.io, this is one of the primary usecases for our Deepviews feature.

Facebook don't track app installs on dashboard for iOS application

I create Facebook application on developers.facebook.com.
Configure and integrate Facebook SDK in my iOS application according to facebook guide.
And now after install application to new device, and login with Facebook. I see tracked events in Analytics -> Events -> Most Recent (filter by event type "App installs").
But in dashboard page a see old date in "Last Mobile App Installs":
If clicked on "Last Mobile App Installs", i see graph with tracked installs:
Several times I validate the configuration of iOS project. I also have another project in which everything works fine. And the project settings are identical.
I checked request after iOS app installed to device: https://graph.facebook.com/v2.3/FACEBOOK_APP_ID/activities?&event=MOBILE_APP_INSTALL (i cut some informations from request).
Response "success": true
What can I try to do?
Edited (29.06.2015)
I check App Ads Helper (thank you Sleepy Panda). And what i see:
I fixed my problem.
For others, who like me will not understand what was happening. Facebook tracked organic install. In my case i took a new device (which was not used with my application earlier). Install and launched app.
Thats all! After few minutes Facebook dashboard has been updated.

Resources