Closed hughknaus closed 4 months ago
@hughknaus can you run this on mobile phone? can you share sample app for this issue?
I tried in Android emulator first but the app now crashes with this log:
2024-02-12 09:24:31.335 18520-18587 Capacitor <MYAPP> E Serious error executing plugin
java.lang.reflect.InvocationTargetException
at java.lang.reflect.Method.invoke(Native Method)
at com.getcapacitor.PluginHandle.invoke(PluginHandle.java:138)
at com.getcapacitor.Bridge.lambda$callPluginMethod$0(Bridge.java:797)
at com.getcapacitor.Bridge.$r8$lambda$ehFTi5f4HhVNFKTbCKAYDkpQYRA(Unknown Source:0)
at com.getcapacitor.Bridge$$ExternalSyntheticLambda3.run(Unknown Source:8)
at android.os.Handler.handleCallback(Handler.java:958)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loopOnce(Looper.java:205)
at android.os.Looper.loop(Looper.java:294)
at android.os.HandlerThread.run(HandlerThread.java:67)
Caused by: java.lang.IllegalArgumentException: noticeHttpTransaction: URL is malformed: /svg/close.svg
at com.newrelic.agent.android.NewRelic.noticeHttpTransaction(NewRelic.java:579)
at com.newrelic.capacitor.plugin.NewRelicCapacitorPluginPlugin.noticeHttpTransaction(NewRelicCapacitorPluginPlugin.java:429)
at java.lang.reflect.Method.invoke(Native Method)
at com.getcapacitor.PluginHandle.invoke(PluginHandle.java:138)
at com.getcapacitor.Bridge.lambda$callPluginMethod$0(Bridge.java:797)
at com.getcapacitor.Bridge.$r8$lambda$ehFTi5f4HhVNFKTbCKAYDkpQYRA(Unknown Source:0)
at com.getcapacitor.Bridge$$ExternalSyntheticLambda3.run(Unknown Source:8)
at android.os.Handler.handleCallback(Handler.java:958)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loopOnce(Looper.java:205)
at android.os.Looper.loop(Looper.java:294)
at android.os.HandlerThread.run(HandlerThread.java:67)
2024-02-12 09:24:31.337 18520-18587 AndroidRuntime <MYAPP> E FATAL EXCEPTION: CapacitorPlugins
Process: <MYAPP>, PID: 18520
java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
at com.getcapacitor.Bridge.lambda$callPluginMethod$0(Bridge.java:806)
at com.getcapacitor.Bridge.$r8$lambda$ehFTi5f4HhVNFKTbCKAYDkpQYRA(Unknown Source:0)
at com.getcapacitor.Bridge$$ExternalSyntheticLambda3.run(Unknown Source:8)
at android.os.Handler.handleCallback(Handler.java:958)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loopOnce(Looper.java:205)
at android.os.Looper.loop(Looper.java:294)
at android.os.HandlerThread.run(HandlerThread.java:67)
Caused by: java.lang.reflect.InvocationTargetException
at java.lang.reflect.Method.invoke(Native Method)
at com.getcapacitor.PluginHandle.invoke(PluginHandle.java:138)
at com.getcapacitor.Bridge.lambda$callPluginMethod$0(Bridge.java:797)
at com.getcapacitor.Bridge.$r8$lambda$ehFTi5f4HhVNFKTbCKAYDkpQYRA(Unknown Source:0)
at com.getcapacitor.Bridge$$ExternalSyntheticLambda3.run(Unknown Source:8)
at android.os.Handler.handleCallback(Handler.java:958)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loopOnce(Looper.java:205)
at android.os.Looper.loop(Looper.java:294)
at android.os.HandlerThread.run(HandlerThread.java:67)
Caused by: java.lang.IllegalArgumentException: noticeHttpTransaction: URL is malformed: /svg/close.svg
at com.newrelic.agent.android.NewRelic.noticeHttpTransaction(NewRelic.java:579)
at com.newrelic.capacitor.plugin.NewRelicCapacitorPluginPlugin.noticeHttpTransaction(NewRelicCapacitorPluginPlugin.java:429)
at java.lang.reflect.Method.invoke(Native Method)
at com.getcapacitor.PluginHandle.invoke(PluginHandle.java:138)
at com.getcapacitor.Bridge.lambda$callPluginMethod$0(Bridge.java:797)
at com.getcapacitor.Bridge.$r8$lambda$ehFTi5f4HhVNFKTbCKAYDkpQYRA(Unknown Source:0)
at com.getcapacitor.Bridge$$ExternalSyntheticLambda3.run(Unknown Source:8)
at android.os.Handler.handleCallback(Handler.java:958)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loopOnce(Looper.java:205)
at android.os.Looper.loop(Looper.java:294)
at android.os.HandlerThread.run(HandlerThread.java:67)
I searched the app for close.svg
and the only reference was inside this file:
/Volumes/Storage/_projects/<MYAPP>/android/app/build/intermediates/incremental/mergeDebugAssets/merger.xml
. I'm betting that is Ionic's close image.
I couldn't find any information relating to the merger.xml
file. I'm assuming that it is an artifact of the Capacitor build??
I'll try to come up with an example app. This is in a fairly large commercial product that used to use the Cordova implementation of including a large block of JS in the index.html file but has undergone conversion to Capacitor.
@hughknaus i can fix this issue from our side, did you try to run that on ios device?
@ndesai-newrelic no, i have not tried on the iOS side yet. Troubleshooting has always been easy in browser, then Android, and finally iOS. But I'll give it try on the iOS side now, I'll let you know in a little bit what I see.
@hughknaus i got your issue on android side, i just want to make sure it is happening on ios side or not. if you are enterprise customer, you can reach out to our support team through GTSE.
@ndesai-newrelic the iOS side definitely doesn't run as expected, but a little harder to tell where the issue lies, here's an XCode screenshot with some Newrelic warnings (on simulator, not actual device):
![Uploading Screenshot 2024-02-12 at 2.22.41 PM.png…]()
@hughknaus i pushed some changes on our main branch, can you test your app in this release?
@ndesai-newrelic thanks! I'll give it a try tomorrow, Thursday. I'm in Mountain TZ.
@hughknaus i am able to fix the issue which you are getting it on browser.
Hi @ndesai-newrelic, I am having a similar issue on browser, but works fine on ios, and I am wondering if there's a release I can try with the fix? Thanks
@Toxiapo can you check this release on browser also?
@ndesai-newrelic Updated to 1.3.5 and things seem to be working great now! Thank you
@ndesai-newrelic so 1.3.5 does partially fix the issue. I can at least load the app in browser now. I do continue to see the leading empty arrays in the console.log, however, it's no longer on every line but still a majority. For example:
[]: jobFilterService:: []: 2 index.js:22
[]: [object Object] 2 index.js:22
[]: [object Object] index.js:22
[]: jobFilterService:: []: usw:hknaus@email.com index.js:22
[]: jobFilterService:: []: usw:hknaus@email.com index.js:22
[]: joblist::ionViewDidEnter fromJobStart = false index.js:22
This is what it normally looks like:
jobFilterService:: 7538.28a007c40e5a86a4.js:1
jobFilterService:: usw:hknaus@email.com 7538.28a007c40e5a86a4.js:1
jobFilterService:: usw:hknaus@email.com
joblist::ionViewDidEnter fromJobStart = false 6377.dd8d15ed994e8c44.js:1
I'm continuing to test Android and iOS today.
@hughknaus That's an astute observation. We are currently automatically collecting logs which may be adding these empty arrays. Could you please open a new issue for this?
Description
I'm getting the below error in the console.log when starting the application:
Also, seeing empty array brackets
[]
before each console logging output like:Steps to Reproduce
main.ts
fileExpected Behavior
Expect the app to run without newrelic errors. Removed the newrelic pieces, app runs fine.
Your Environment
Apple M2 Max, Sonoma 14.3 Ionic/Angular app building with Capacitor/Trapeze Serving to local browser (Chrome)