Closed PrinzJuliano closed 4 months ago
@PrinzJuliano is this still issue?
@ndesai-newrelic I am now using the newest Capacitor Plugin Version 1.3.3.
The same issue persists and in fact more issues are being raised:
Caused by: java.lang.IllegalArgumentException: noticeHttpTransaction: URL is malformed: /svg/eye.svg
at com.newrelic.agent.android.NewRelic.noticeHttpTransaction(NewRelic.java:579)
See attached New Relic Crash Report: JP Insider Android Crashreport Feb 14 2024 1351.txt
I can confirm on Version 1.3.2 the app can open the local URL while not being able to run in HTTPS Mode, whereas on Version 1.3.3 the app starts but as soon as local resources are loaded, like a local SVG file, the app just crashes with the before mentioned exception. The original issue persists, though.
@PrinzJuliano i fixed android crash in latest release, can you check it?
I can confirm that with version 1.3.4 the app no longer crashes in HTTP Mode. However, ion-icons no longer load. And Fetch Requests fail as you try to set headers in the global fetch override, but some fetch requests are missing the second parameter "options".
Thus I get the error: Cannot set properties of undefined (setting 'headers')
Relevant Minified Code:
window.fetch = function() {
var B = arguments
, q = arguments[0]
, _e = arguments[1];
return me.getHTTPHeadersTrackingFor().then(j=>(console.log(j),
me.generateDistributedTracingHeaders().then(be=>(console.log(be),
H.startTime = Date.now(),
q && "object" == typeof q ? (H.url = q.url,
_e && "method"in _e ? H.method = _e.method : q && "method"in q && (H.method = q.method)) : (H.url = q,
_e && "method"in _e && (H.method = _e.method)),
_e && "headers"in _e ? (_e.headers.newrelic = be.newrelic,
_e.headers.traceparent = be.traceparent,
_e.headers.tracestate = be.tracestate,
JSON.parse(j.headersList).forEach(Ae=>{
void 0 !== _e.headers[Ae] && (H.params[Ae] = _e.headers[Ae])
}
)) : (_e.headers = {}, // Relevant broken line
_e.headers.newrelic = be.newrelic,
_e.headers.traceparent = be.traceparent,
_e.headers.tracestate = be.tracestate,
B[1] = _e),
H.bytesSent = _e && "body"in _e ? _e.body.length : 0,
Doing my own regressional testing: IonIcons would still load in 1.3.2 and Fetch Requests still fetched data.
The original Error continues to occur in 1.3.4. Setting the scheme to "https" results in "NewRelicCapacitorPlugin" plugin is not implemented on android
@PrinzJuliano thanks for feedback, i will check this from my side also
@PrinzJuliano can you provide sample app where you are seeing this ? it is really helpful.
@ndesai-newrelic I created a fresh Ionic Android app. https://github.com/PrinzJuliano/newrelic-test
This does not include web instrumentation. The app runs on https://newrelic-test.prinzjuliano.com for deep linking and autofill credential support on android.
@PrinzJuliano can you check on latest release?
I have tested the current version 1.3.5. It seems to mostly work now.
I still only get
[]: [object Object]
console.log
and
[]: ERROR []: [object Object]
console.error
I would assume this is a serialization issue with the global console logging system.
@PrinzJuliano we will fix it for next release
@PrinzJuliano i created PR for this fix, can you check it?
Once a build version (i.e. 1.4.1) is available I will be able to test it. I cannot install the raw git repository as it does not contain the required declarations.
Cannot find module '@newrelic/newrelic-capacitor-plugin' or its corresponding type declarations.
Description
Enabling https as androidScheme for android results in the app no longer loading the plugin. Furthermore, hard Startup Errors arise with the error message "NewRelicCapacitorPlugin" plugin is not implemented on android.
When disabling https, the app launches.
Steps to Reproduce
To enable Password managers and special security context capabilities, an android Configuration can be enabled to run the App under https://<hostname>
Namely: CapacitorConfig.server.androidScheme = 'https' See https://capacitorjs.com/docs/guides/autofill-credentials#configuration-for-android
Follow the guide to install the newrelic capacitor plugin and enable https as scheme for android.
Expected Behavior
The App should start without errors.
Relevant Logs / Console output
"NewRelicCapacitorPlugin" plugin is not implemented on android
Your Environment
macOS 14.1.1 node: v20.9.0 npm 10.1.0 android: 14 (UP1A.231105.003)
Packages:
Additional context
I need https to ensure autofill credentials works.