robingenz / capacitor-mlkit-plugin-demo

⚡️ Simple Ionic Angular app to demonstrate the use of certain Capacitor ML Kit plugins.
MIT License
37 stars 22 forks source link

bug: Android app doesn't start #14

Closed bperel closed 8 months ago

bperel commented 9 months ago

Hello, I'm trying to run the demo app on an Android emulator (platform: Ubuntu but I don't think that it matters in this case).

I get the following warnings and errors in the logcat of Android Studio:

2023-11-26 23:29:04.416 10048-10048 mo.mlkitplugin          dev...capacitorjs.demo.mlkitplugins  W  Accessing hidden field Landroid/os/Trace;->TRACE_TAG_APP:J (light greylist, reflection)
2023-11-26 23:29:04.416 10048-10048 mo.mlkitplugin          dev...capacitorjs.demo.mlkitplugins  W  Accessing hidden method Landroid/os/Trace;->isTagEnabled(J)Z (light greylist, reflection)
2023-11-26 23:29:04.478 10048-10048 mo.mlkitplugin          dev...capacitorjs.demo.mlkitplugins  W  Accessing hidden field Landroid/graphics/Insets;->left:I (light greylist, linking)
2023-11-26 23:29:04.478 10048-10048 mo.mlkitplugin          dev...capacitorjs.demo.mlkitplugins  W  Accessing hidden field Landroid/graphics/Insets;->top:I (light greylist, linking)
2023-11-26 23:29:04.478 10048-10048 mo.mlkitplugin          dev...capacitorjs.demo.mlkitplugins  W  Accessing hidden field Landroid/graphics/Insets;->right:I (light greylist, linking)
2023-11-26 23:29:04.478 10048-10048 mo.mlkitplugin          dev...capacitorjs.demo.mlkitplugins  W  Accessing hidden field Landroid/graphics/Insets;->bottom:I (light greylist, linking)
2023-11-26 23:29:04.506 10048-10048 mo.mlkitplugin          dev...capacitorjs.demo.mlkitplugins  W  Accessing hidden method Landroid/view/View;->computeFitSystemWindows(Landroid/graphics/Rect;Landroid/graphics/Rect;)Z (light greylist, reflection)
2023-11-26 23:29:04.507 10048-10048 mo.mlkitplugin          dev...capacitorjs.demo.mlkitplugins  W  Accessing hidden method Landroid/view/ViewGroup;->makeOptionalFitsSystemWindows()V (light greylist, reflection)
2023-11-26 23:29:04.570 10048-10081 cr_VariationsUtils      dev...capacitorjs.demo.mlkitplugins  E  Failed reading seed file "/data/user/0/dev.robingenz.capacitorjs.demo.mlkitplugins/app_webview/variations_seed": /data/user/0/dev.robingenz.capacitorjs.demo.mlkitplugins/app_webview/variations_seed (No such file or directory)
2023-11-26 23:29:04.581 10048-10082 cr_ChildProcLH          dev...capacitorjs.demo.mlkitplugins  W  Create a new ChildConnectionAllocator with package name = com.android.chrome, sandboxed = true
2023-11-26 23:29:04.729 10048-10048 mo.mlkitplugin          dev...capacitorjs.demo.mlkitplugins  W  Accessing hidden method Landroid/view/textclassifier/logging/SmartSelectionEventTracker;-><init>(Landroid/content/Context;I)V (light greylist, reflection)
2023-11-26 23:29:04.729 10048-10048 mo.mlkitplugin          dev...capacitorjs.demo.mlkitplugins  W  Accessing hidden method Landroid/view/textclassifier/logging/SmartSelectionEventTracker;->logEvent(Landroid/view/textclassifier/logging/SmartSelectionEventTracker$SelectionEvent;)V (light greylist, reflection)
2023-11-26 23:29:04.729 10048-10048 mo.mlkitplugin          dev...capacitorjs.demo.mlkitplugins  W  Accessing hidden method Landroid/view/textclassifier/logging/SmartSelectionEventTracker$SelectionEvent;->selectionStarted(I)Landroid/view/textclassifier/logging/SmartSelectionEventTracker$SelectionEvent; (light greylist, reflection)
2023-11-26 23:29:04.729 10048-10048 mo.mlkitplugin          dev...capacitorjs.demo.mlkitplugins  W  Accessing hidden method Landroid/view/textclassifier/logging/SmartSelectionEventTracker$SelectionEvent;->selectionModified(II)Landroid/view/textclassifier/logging/SmartSelectionEventTracker$SelectionEvent; (light greylist, reflection)
2023-11-26 23:29:04.729 10048-10048 mo.mlkitplugin          dev...capacitorjs.demo.mlkitplugins  W  Accessing hidden method Landroid/view/textclassifier/logging/SmartSelectionEventTracker$SelectionEvent;->selectionModified(IILandroid/view/textclassifier/TextClassification;)Landroid/view/textclassifier/logging/SmartSelectionEventTracker$SelectionEvent; (light greylist, reflection)
2023-11-26 23:29:04.729 10048-10048 mo.mlkitplugin          dev...capacitorjs.demo.mlkitplugins  W  Accessing hidden method Landroid/view/textclassifier/logging/SmartSelectionEventTracker$SelectionEvent;->selectionModified(IILandroid/view/textclassifier/TextSelection;)Landroid/view/textclassifier/logging/SmartSelectionEventTracker$SelectionEvent; (light greylist, reflection)
2023-11-26 23:29:04.729 10048-10048 mo.mlkitplugin          dev...capacitorjs.demo.mlkitplugins  W  Accessing hidden method Landroid/view/textclassifier/logging/SmartSelectionEventTracker$SelectionEvent;->selectionAction(III)Landroid/view/textclassifier/logging/SmartSelectionEventTracker$SelectionEvent; (light greylist, reflection)
2023-11-26 23:29:04.729 10048-10048 mo.mlkitplugin          dev...capacitorjs.demo.mlkitplugins  W  Accessing hidden method Landroid/view/textclassifier/logging/SmartSelectionEventTracker$SelectionEvent;->selectionAction(IIILandroid/view/textclassifier/TextClassification;)Landroid/view/textclassifier/logging/SmartSelectionEventTracker$SelectionEvent; (light greylist, reflection)
2023-11-26 23:29:04.816 10048-10048 Capacitor               dev...capacitorjs.demo.mlkitplugins  W  Unable to read file at path public/plugins
2023-11-26 23:29:04.842 10048-10112 cr_media                dev...capacitorjs.demo.mlkitplugins  W  Requires BLUETOOTH permission
2023-11-26 23:29:04.885 10048-10129 eglCodecCommon          dev...capacitorjs.demo.mlkitplugins  E  glUtilsParamSize: unknow param 0x000082da
2023-11-26 23:29:04.885 10048-10129 eglCodecCommon          dev...capacitorjs.demo.mlkitplugins  E  glUtilsParamSize: unknow param 0x000082da
2023-11-26 23:29:04.915 10048-10129 VideoCapabilities       dev...capacitorjs.demo.mlkitplugins  W  Unrecognized profile 4 for video/hevc
2023-11-26 23:29:04.924 10048-10129 cr_MediaCodecUtil       dev...capacitorjs.demo.mlkitplugins  W  HW encoder for video/avc is not available on this device.
2023-11-26 23:29:04.933 10048-10048 mo.mlkitplugin          dev...capacitorjs.demo.mlkitplugins  W  Accessing hidden field Landroid/view/WindowInsets;->CONSUMED:Landroid/view/WindowInsets; (light greylist, reflection)
2023-11-26 23:29:04.934 10048-10048 mo.mlkitplugin          dev...capacitorjs.demo.mlkitplugins  W  Accessing hidden method Landroid/view/View;->getViewRootImpl()Landroid/view/ViewRootImpl; (light greylist, reflection)
2023-11-26 23:29:04.934 10048-10048 mo.mlkitplugin          dev...capacitorjs.demo.mlkitplugins  W  Accessing hidden field Landroid/view/View$AttachInfo;->mVisibleInsets:Landroid/graphics/Rect; (light greylist, reflection)
2023-11-26 23:29:04.934 10048-10048 mo.mlkitplugin          dev...capacitorjs.demo.mlkitplugins  W  Accessing hidden field Landroid/view/ViewRootImpl;->mAttachInfo:Landroid/view/View$AttachInfo; (light greylist, reflection)
2023-11-26 23:29:04.945 10048-10131 OpenGLRenderer          dev...capacitorjs.demo.mlkitplugins  W  Failed to choose config with EGL_SWAP_BEHAVIOR_PRESERVED, retrying without...
2023-11-26 23:29:04.964 10048-10131 eglCodecCommon          dev...capacitorjs.demo.mlkitplugins  E  glUtilsParamSize: unknow param 0x000082da
2023-11-26 23:29:04.964 10048-10131 eglCodecCommon          dev...capacitorjs.demo.mlkitplugins  E  glUtilsParamSize: unknow param 0x000082da
2023-11-26 23:29:04.977 10048-10131 eglCodecCommon          dev...capacitorjs.demo.mlkitplugins  E  GoldfishAddressSpaceHostMemoryAllocator: ioctl_ping failed for device_type=5, ret=-1
2023-11-26 23:29:05.054 10048-10079 cr_CrashFileManager     dev...capacitorjs.demo.mlkitplugins  W  /data/user/0/dev.robingenz.capacitorjs.demo.mlkitplugins/cache/WebView/Crash Reports does not exist or is not a directory
2023-11-26 23:29:05.387 10048-10048 mo.mlkitplugin          dev...capacitorjs.demo.mlkitplugins  W  Accessing hidden method Landroid/os/Trace;->asyncTraceBegin(JLjava/lang/String;I)V (light greylist, reflection)
2023-11-26 23:29:05.387 10048-10048 mo.mlkitplugin          dev...capacitorjs.demo.mlkitplugins  W  Accessing hidden method Landroid/os/Trace;->asyncTraceEnd(JLjava/lang/String;I)V (light greylist, reflection)
2023-11-26 23:29:05.387 10048-10048 mo.mlkitplugin          dev...capacitorjs.demo.mlkitplugins  W  Accessing hidden method Landroid/os/Trace;->traceCounter(JLjava/lang/String;I)V (light greylist, reflection)
2023-11-26 23:29:05.453 10048-10048 Capacitor/Console       dev...capacitorjs.demo.mlkitplugins  E  File: http://localhost/ - Line 781 - Msg: SyntaxError: Unexpected token ?
2023-11-26 23:29:05.455 10048-10143 Capacitor               dev...capacitorjs.demo.mlkitplugins  E  JavaScript Error: {"type":"js.error","error":{"message":"Uncaught SyntaxError: Unexpected token ?","url":"http://localhost/vendor.js","line":21981,"col":28,"errorObject":"{}"}}
2023-11-26 23:29:05.456 10048-10048 Capacitor/Console       dev...capacitorjs.demo.mlkitplugins  E  File: http://localhost/vendor.js - Line 21981 - Msg: Uncaught SyntaxError: Unexpected token ?

I followed the README by running npm i and npx cap sync android before building the Android app in Android Studio. Did I miss something?

robingenz commented 9 months ago

It seems like some JS error is thrown: SyntaxError: Unexpected token ?. Unfortunately, I cannot reproduce the issue, at least not on MacOS. Feel free to submit a PR with a fix.

github-actions[bot] commented 8 months ago

It looks like there hasn't been a reply in 30 days, so I'm closing this issue.