capawesome-team / capacitor-mlkit

⚡️ ML Kit plugins for Capacitor. Supports Android and iOS.
https://capawesome.io/plugins/mlkit/
Apache License 2.0
140 stars 39 forks source link

bug: App including barcode scanning plugin builds, install but does not start on simulators #87

Closed weeblr closed 10 months ago

weeblr commented 10 months ago

Plugin(s)

Did you test the latest version?

Platform(s)

Current behavior

Hello, Trying to use the plugin in a small capacitor app, and test on ios simulator (android works fine).

App builds and install fine on simulator (see details below) but when launched:

I have narrowed things down to the mlkit barcode plugin by disabling all other features/plugin in the app. I get the exact same behavior using your full demo app.

See below for error from log file and possibly relevant info.

Pretty new to this, so please bear with me if I'm missing something obvious. Let me know if there's some more log files that I can go through.

Expected behavior

App starts and open its main window.

Reproduction

https://github.com/robingenz/capacitor-mlkit-plugin-demo

Steps to reproduce

  1. Environment McMini Sonoma, Xcode 15.0, capacitor 5.4.1

  2. Config: defaults

  3. Run either through capacitor CLI or from within Xcode. All default settings.

  4. Error from logs CoreSimulator.log:

Oct 23 19:35:05 Mini-de-XXXX com.apple.CoreSimulator.simctl[27577] <Error>: launchApplicationWithID:options:pid:error:: Error Domain=FBSOpenApplicationServiceErrorDomain Code=1 "Simulator device returned an error for the requested operation." UserInfo={NSLocalizedDescription=Simulator device returned an error for the requested operation., NSUnderlyingError=0x60000034e940 {Error Domain=FBSOpenApplicationServiceErrorDomain Code=1 "The request to open "dev.robingenz.capacitorjs.demo.mlkitplugins" failed." UserInfo={BSErrorCodeDescription=RequestDenied, NSLocalizedDescription=The request to open "dev.robingenz.capacitorjs.demo.mlkitplugins" failed., NSUnderlyingError=0x60000034e8e0 {Error Domain=FBProcessExit Code=64 "The process failed to launch." UserInfo={NSUnderlyingError=0x6000003ea400 {Error Domain=RBSRequestErrorDomain Code=5 "Launch failed." UserInfo=0x600001828bc0 (not displayed)}, BSErrorCodeDescription=launch-failed, NSLocalizedFailureReason=The process failed to launch.}}, FBSOpenApplicationRequestID=0x94bd, NSLocalizedFailureReason=The request was denied by service delegate (SBMainWorkspace).}}, NSLocalizedFailureReason=The request was denied by service delegate (SBMainWorkspace)., FBSOpenApplicationRequestID=0x94bd,

Other information

Snapshot generation request for Bundle Id: com.weeblr.xxxxx app is denylisted

but I have not found it again since that one time. Not sure it adds anything to the error message listed above

Capacitor doctor

capacitor-mlkit-plugin-demo % npx cap doctor [warn] The bundledWebRuntime configuration option has been deprecated. Can be safely deleted. 💊 Capacitor Doctor 💊

Latest Dependencies:

@capacitor/cli: 5.5.0 @capacitor/core: 5.5.0 @capacitor/android: 5.5.0 @capacitor/ios: 5.5.0

Installed Dependencies:

@capacitor/cli: 5.4.1 @capacitor/core: 5.4.1 @capacitor/android: 5.4.1 @capacitor/ios: 5.4.1

[success] iOS looking great! 👌 [success] Android looking great! 👌

Before submitting

robingenz commented 10 months ago

Thank you for your request. Unfortunately, I can only help you if I can reproduce the problem. My demo app works fine for me. Please create a new app as Minimal, Reproducible Example using this template in a public GitHub repository. Maybe then we will find the problem.

github-actions[bot] commented 10 months ago

Please provide a Minimal, Reproducible Example using this template in a public GitHub repository so we can debug the issue.

weeblr commented 10 months ago

Hi,

I thought you'd say that but if your demo app works for you - and not for me - I don't see why the simple repro app would not.

I think I'll wait to try and see what happens with a physical device first (should arrive today). Maybe I'll have a different outcome or some new message will appear in ether log . I'll report back then.

Cheers

robingenz commented 10 months ago

Maybe I have a configuration in my demo app that is causing the problems and not the plugin.

I think I'll wait to try and see what happens with a physical device first (should arrive today).

Okay, that sounds good.

weeblr commented 10 months ago

Maybe I have a configuration in my demo app that is causing the problems and not the plugin.

More likely I have misconfigured something as mine and the demo app behave the same. But the simple app is indeed best, too many moving parts otherwise

weeblr commented 10 months ago

Hi

So I got an iphone to test today (14, currently running ios16.6) and there the app works.

Therefore it looks like the issue is only with simulators. BTW, you confirm the MLKit demo app works for you on an iphone 15 simulator - I'm on a macMini M2 if that matters

I'll try and do the simple app repro today.

Cheers

robingenz commented 10 months ago

I've only tested it on a real device last time. I will give it a try in the simulator.

robingenz commented 10 months ago

No problem here.

grafik

weeblr commented 10 months ago

OK, then I think I'm going to stop there, now that at least I have a working solution with the physical device. Already spent several days Googling and crawling through log files, hopefully some update of something at some point will fix it.

robingenz commented 10 months ago

Alright, in this case I am closing this issue.