-
-
Notifications
You must be signed in to change notification settings - Fork 241
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Zone-JS Error Forwading issue #2278
Comments
I guess you guys maybe know the best. This patch here should be applied somewhat to the build process of the @nativescript/zone-js package. Afterwards none of the errors (thrown in nativescript) are ignored anymore but instead forwarded to the traceModul (which i guess is/should be the wanted behaviour?).
I even did one step more and cleaned up the whole package with this patch here (deleteing all unused/duplicated files..): https://pastebin.com/w17vscZS. Again: i would create a PR for it but i dont find the place for this package it seems somehow made manually. Thats why it would be awesome to have an full overview of nativescript and how its build with the full process of a working CI/CD pipeline NativeScript/android#1623. |
This comment was marked as abuse.
This comment was marked as abuse.
IIRC zone code isn't in any repo. It was on this repo before as a single js file, which was bad already tbh. That said we're moving away from a custom zone and aiming to use zone.js without any hard patches, only what their API allows us. Current zone.js allows us to define custom error handlers already, and most of nativescript's polyfills are sufficient for it to work without any workarounds. |
Yes we are facing issues which we dont know the source where they are coming from. I figured out that we didnt implement the trace error handler, but the source of the crashes seems to be inside of the promises of this Zone stuff. So i was expecting that those are forwarded to the trace system and not ending just in console.err |
This comment was marked as abuse.
This comment was marked as abuse.
We were able - with the given patch above, to trace down the source of the issue. Its seems its simple coming from the snackbar. nstudio/nativescript-snackbar#20 Edit: code seems to be there, pipeline still fails somehow on this repo. |
With the new nativescript-angular 12 release (https://blog.nativescript.org/nativescript-angular-12/index.html), we no longer use a custom Zone[Zone.__symbol__['ignoreConsoleErrorUncaughtError']] = true;
Zone[Zone.__symbol__['unhandledPromiseRejectionHandler']] = (e) => {
// handle your rejection here
}; |
Notice that should be |
Environment
Provide version numbers for the following components (information can be retrieved by running
tns info
in your project folder or by inspecting thepackage.json
of the project):Describe the bug
Errors are not forwarded to the Error Logger (tracer), instead those error ares written to console.error(). This affects production builds, and its hard to find context information without stacktrace.
I already have an patch ready for @nativescript/zone-js/zone-nativescript.js but the build system behind this is kind of crazy if theres any(?) i only find hardly outdated branches and not even source code for the given zone-nativescript.js .. The files in @nativescript/zone-js are also at least duplicated, also theres .tar.gz stuff laying arround.. Lets clean this up please.. Please someone point me where to start..
To Reproduce
Create NS-Angular project
Throw an exception for example throw new Error('test'); in constructor
Expected behavior
should be forwarded to Tracer.error instead of console.error(x);
so we can trace it down with something like
The text was updated successfully, but these errors were encountered: