Download failed because you may not have purchased this app - emulator - download

Dears,
My apk expansion is working fine with real devices, but with emulator I get this error
Download failed because you may not have purchased this app
This is the logcat:
BE/Checking_download: expansion not delivered
E/Checking_download: try intent
E/Checking_download: intented launched
E/Checking_download: Category isandroid.intent.category.LAUNCHER
E/Checking_download: Start the download service
E/Checking_download: initialize activity to show progress , result is: 2
ro.sf.lcd_density must be defined as a build property
[ 04-25 00:08:50.630 8167: 8167 D/ ]
HostConnection::get() New Host Connection established 0x9f4b1d40, tid 8167
E/Checking_download: service_resume :
[ 04-25 00:08:50.828 8167: 8190 D/ ]
HostConnection::get() New Host Connection established 0xa1fdf2c0, tid 8190
E/eglCodecCommon: glUtilsParamSize: unknow param 0x00008cdf
E/eglCodecCommon: glUtilsParamSize: unknow param 0x00008824
E/Checking_download: service_to_connected :
E/Checking_download: service_connected :
E/FA: Discarding data. Failed to send app launch
E/FA: Failed to get app instance id
E/FA: Failed to send current screen to service
E/FA: Discarding data. Failed to send event to service
E/Checking_download: DownloadStateChanged : Looking for resources to download
E/Checking_download: DownloadStateChanged : Download failed because you may not have purchased this app
Notes:
1-Again app live on google play working fine with real devices.
2-Emulator API version is : google play API-25.
3-Google account is added to emulator. ( logged in with my gmail).
4-Google play services installed.
Thanks in advance.

The answer is very simple, the application version code must be same like uploaded version to google play.
i.e ( in build.gradle, app level check
versionCode 2
Then you have to confirm from google play that this version is already uploaded and life.

Related

APP launch error: Service could not initialize: 18E226: xpcproxy + 11291

I've built an App in Xcode. I've signed it with a valid Developer ID certificate. Notarized and released the app via Archive function in XCode. And the app launches fine on some MacBooks.
But on another launch fails with error
The application %name% can't be opened.
I've checked the system.log and it says
Jul 15 09:59:40 com.apple.xpc.launchd1 (com.apple.xpc.launchd.oneshot.0x10000ad8.Gaetano Lunches[59755]): Service could not initialize: 18E226: xpcproxy + 11291 [1534][1571C9B2-C489-3268-9D6B-73137AC77303]: 0x1
Jul 15 09:59:40 com.apple.xpc.launchd1 (com.apple.xpc.launchd.oneshot.0x10000ad8. Gaetano Lunches[59755]): Service exited with abnormal code: 78
The app is very simple. It is just a Notification center widget (APP Type XPC!). It receives data from remote URL and displays it via NCWidgetListViewController.
The source code could be found on github
As I mentioned the problem exists only on some machines. The rate is about 50/50. On all machines app installation from Anywhere is allowed. spctl-master is disabled. Permissions for files are correct.

when exit and enter the app again using a MasterDetailPage, it crashes after a certain amount of times

The first page of my app is a Contentpage where you login or MasterDetailPage if you are already logged in. Even when the app runs fine, if I exit tha app and enter a certain amount of times (sometimes is 2, sometimes even 10), the app crashes and I get the next error message. Java.Lang.IllegalArgumentException: and this appears in crashlytics:
Shutting down VM
FATAL EXCEPTION: main
Fatal Exception: > java.lang.IllegalArgumentException: No view found for id 0x249 (unknown) for fragment FragmentContainer{bbc6fff #0 id=0x249}
at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1413)
at android.support.v4.app.FragmentManagerImpl.moveFragmentToExpectedState(FragmentManager.java:1750)
at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1819)
at android.support.v4.app.BackStackRecord.executeOps(BackStackRecord.java:797)
at android.support.v4.app.FragmentManagerImpl.executeOps(FragmentManager.java:2590)
at android.support.v4.app.FragmentManagerImpl.executeOpsTogether(FragmentManager.java:2377)
at android.support.v4.app.FragmentManagerImpl.removeRedundantOperationsAndExecute(FragmentManager.java:2332)
at android.support.v4.app.FragmentManagerImpl.execPendingActions(FragmentManager.java:2239)
at android.support.v4.app.FragmentManagerImpl$1.run(FragmentManager.java:700)
at android.os.Handler.handleCallback(Handler.java:790)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:164)
at android.app.ActivityThread.main(ActivityThread.java:6494)
at java.lang.reflect.Method.invoke(Method.java)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:438)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:807)
This only happens when I am in the masterdetailpage, in the login page functions very good
The error was that I make a transition between 2 pages in the code too fast, so one of them didn't finish loading and the other was starting. That was the source of my error. Now that I fixed it I can see it in my emulator android 8.1, but have problems with 7.0 if I know why I will put it in the post.
EDIT:
The error in 7.1 is only when I am trying to installed it again in my phone with debug. The error is the next:
Android.View.WindowManager BadTokenException: Unable to add window token android.os.BinderProxy is not valid; is your activity running?
if you use the app normally after the installation, it works good!

Cannot find an ad network adapter with the name(s): com.google.DummyAdapter

i a having issue with rewarded videos in admob , when i use test unit ID its worked but when i use real unit id i got this error :
[ADMOB][ADS][LANDING] Reward based video ad failed to load. Error Domain=com.google.ads Code=1 "Request Error: No ad to show." UserInfo={NSLocalizedDescription=Request Error: No ad to show., NSLocalizedFailureReason=Request Error: No ad to show.}
2018-05-12 12:08:14.070913+0300 [2284:565044] <Google> Cannot find an ad network adapter with the name(s): com.google.DummyAdapter. Remember to link all required ad network adapters and SDKs, and set -ObjC in the 'Other Linker Flags' setting of your build target.
any idea why ?
its not a problem , since its return error "no ads to show" means there is no ads to show in my country or region , so i've used a VPN to change my location and the ads start showing .

react-native VS android emulator chrome debugger error "Cannot set property 'volume' of null"

I am trying to debug react-native app running on VS emulator in chrome. The error I am getting at the moment is "Cannot set property 'volume' of null". It is like 4th or 5th cryptic error I am getting since starting, but the first one when I hit the wall. I will outline all configuration steps in case I botched something earlier:
Initialized project with react-native init myapp
Started the bundle server with react-native start --host 192.168.100.4 (the reason for host parameter is CORS error)
Started the app with "react-native bundle --platform android --dev false --entry-file index.js --bundle-output android/app/src/main/assets/index.android.bundle --assets-dest android/app/src/main/res && react-native run-android" (the reason for react-native bundle command is assets error)
On emulator went to shake -> Dev Settings -> Debug server host & port for device, set it to 192.168.100.4:8081 (the reason for that is "cannot connect to bundle server on localhost)
shake -> Debug JS Remotely
Chrome window opens, I hit F12. Now it still displays CORS error for a while, but after some page refreshes it displays "Cannot set property 'volume' of null" and sticks to it:
(index):94 Uncaught TypeError: Cannot set property 'volume' of null
at Object.render ((index):94)
at Object.setState ((index):48)
at WebSocket.ws.onopen ((index):152)
Just in case, here is CORS error that I get initially:
Failed to load
http://localhost:8081/index.delta?platform=android&dev=true&minify=false:
No 'Access-Control-Allow-Origin' header is present on the requested
resource. Origin 'http://192.168.100.4:8081' is therefore not allowed
access. If an opaque response serves your needs, set the request's
mode to 'no-cors' to fetch the resource with CORS disabled.
(index):188 Uncaught (in promise) TypeError: Failed to fetch
It goes away after page refresh, but I wonder why it still happening.
Did anyone manage to setup Chrome Debugging with VS emulator and react-native? If so, please share your experience, all tutorials I found just happily advice to run react-native start and react-native run-android and everything should be smooth ride after that )
I had a similar issue with the debugger mode and was getting an error.
I am not sure of the WHY? to that answer but the extensions in the chrome might be the problems. I disabled the extensions and I didn't get any of the errors post that.
Open the application
Select DevSettings
Choose Debug server host & port for device.
Type your system ip address along with the port number of the metro
builder.
For getting system ip address.
Open command prompt
Type ipconfig
Select ipv4 address

Azure Notification Hub iOS template not accepting badge field anymore?

We are registering for template push notifications using Xamarin's Azure Messaging component.
So far we've used the following template to register to notifications:
#"{""aps"": {""alert"": ""$(message)"",""badge"": ""$(badge)"",""sound"": ""$(sound)""}}"
We are passing this string to the Hub.RegisterTemplateAsync in the iOS app.
Since some time ago (less than a month), the call to RegisterTemplateAsync generates the following response:
Apr 3 13:35:03 iPhone MyApp[352] <Warning>: Error Response:<Error><Code>400</Code><Detail>The supplied notification payload is invalid.TrackingId:5dbf4199-cf52-4245-b8e4-acfa4e00cfee_G7,TimeStamp:4/3/2016 10:35:04 AM</Detail></Error>
Apr 3 13:35:03 iPhone MyApp[352] <Warning>: -------------> Notifications: RegisterTemplateAsync error: Fail to perform registration operation. Response:<Error><Code>400</Code><Detail>The supplied notification payload is invalid.TrackingId:5dbf4199-cf52-4245-b8e4-acfa4e00cfee_G7,TimeStamp:4/3/2016 10:35:04 AM</Detail></Error>
It is exactly the same binary which used to work. Now it doesn't.
When troubleshooting the issue, we found out the problem is the badge field. When we remove it, the registration to the notification hub succeeds:
#"{""aps"": {""alert"": ""$(message)"",""sound"": ""$(sound)""}}";
So now we have a broken production app in AppStore that can no longer get notifications.
Is this something that changed on the hub side or is there a chance that we did something wrong?
Have you tried using ""#(badge)"" instead of ""$(badge)""?

Resources