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

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.

Related

WKWebView in Blackberry Dynamics iOS app cannot save cookies

We have a Xamarin.iOS app which uses the Blackberry Dynamics SDK. (v11.0.1.11)
In this app we show a WKWebView, which loads a page that uses cookie based authentication. The problem is, that cookies seem not to be correctly saved. During loading of the WKWebView I see entries like this in the console output:
2023-01-17 13:16:34.765 MyApp[1110:277171] DiskCookieStorage changing policy from 2 to 0, cookie file: file:///private/var/mobile/Containers/Data/Application/7FB9EDEF-FB4A-4E7B-A8B0-E02C209D1F20/Library/Cookies/Cookies.binarycookies
2023-01-17 13:16:34.779 MyApp[1110:277171] could not create directory "/private/var/mobile/Containers/Data/Application/7FB9EDEF-FB4A-4E7B-A8B0-E02C209D1F20/Library/Cookies" for future sandbox extension, error Error Domain=NSCocoaErrorDomain Code=516 "The file “Cookies” couldn’t be saved in the folder “Library” because a file with the same name already exists." UserInfo={NSFilePath=/private/var/mobile/Containers/Data/Application/7FB9EDEF-FB4A-4E7B-A8B0-E02C209D1F20/Library/Cookies, NSUnderlyingError=0x28237d8f0 {Error Domain=NSPOSIXErrorDomain Code=17 "File exists"}}
Then when the WebView loads it gets a "401 - Unauthorized" from the server because (I assume) the cookie is missing. Doing the same in our version of the app not using the Blackberry SDK we do not get this log entry and the page loads without problems. Any idea why cookies cannot be saved in the Blackberry version?

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!

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

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.

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