[Vue warn]: Unhandled error during execution of setup function - vue.js

[Vue warn]: Unhandled error during execution of setup function <[...slug] onVnodeUnmounted=fn<onVnodeUnmounted> ref=Ref< undefined > >
This error comes up all the time without any obvious cause, while I'm developing with Nuxt 3 (Vue 3). I assume it's happening whenever Nuxt is processing request to an external API but I don't know.
It's mostly fine, just the error in the local/Terminal console (not in the browser). But sometimes, it breaks the site with a cryptic "DOM exception, user aborted the request" type message.
This happens rarely on the live site but does sometimes and it's bothersome.
Anyone know what might be causing it? Anyone experiencing similar?
Nothing is obvious to me to try, it's quite cryptic.

Related

Ionic capcitor + vue Network error " Request aborted at e.exports (chunk-vendors.85bc3696.js:1) at XMLHttpRequest.m.onabort" on android emulator

I'm using Ionic/Vue and wheen I run the application in my browser it works well but when I compile and run on an android emulator I get the error below. Please help
Error: Request aborted at e.exports (chunk-vendors.85bc3696.js:1) at XMLHttpRequest.m.onabort (chunk-vendors.85bc3696.js:26)
That error indicates that some of your vue components gets destroyed before ajax request gets completed. Check over all your code - everywhere you invoke remote service make sure that you 'await' result before allow anything to switch to another route, which leads to components disposal. Sometimes you need to do 'unsubscribe' from http request in component disposal
Actually, that probably is not an error - that is normal that request gets aborted if result is not needed anymore

Client-side error monitoring that catches 404s and other script / resource errors?

I've been looking into New Relic, BugSnag, and a few others, but no one seems to be catching 404 errors in their client-side monitoring. For example, say I have the following script tag in a given page:
<script src="//cdn.example.com/app.js1445291270"></script>
with the minor but critical typo of missing a ? after .js.
This of course returns a 404 and the script never loads.
Are there any services that would catch client-side errors like this?
You should be able to do this with Bugsnag. You can detect whether the status= 404, and use Bugsnag.notifyException() to send the error in. Hope this helps!
TrackJS error monitoring supports this use case. Here is how to add monitoring for resource loading failures.

Express.js: how to handle "Error: ENOENT, unlink" errors?

I have a piece of code where I delete a file from the server. Sure, I could firstly check if file even exists and then delete it; and I've done it so. But, what really bothers me is why express.js app crashes when it wants to delete a file that doesn't exists? I get the 'Error: ENOENT, unlink'.
fs.unlink(path, function(err){
if (err) throw err;
});
If in the above code "path" does not exists, I get the "ENOENT" error and server crashes.
I thought "server.on('error', onError);" in www file handles such errors as well. Is it possible to add such a handler?
So you should just handle that error there. That's the place in code that knows best how to handle it and what caused it. The broader last-resort places are server.on('error', handler) but that's for errors within the express HTTP service processing logic itself, not any error in the entire node process. For any error in the process there's process.on('uncaughtException', handler).
why express.js does not handle such errors
Because express is not omniscient and the correct way to handle that error is only known to you. For all express knows, crashing the process IS the correct behavior.

Errors in PhotoHunt sample app

I followed the following documentation to see demo for the PhotoHunt app.
https://developers.google.com/+/photohunt/java
When I run the application, I get the following in the web-browser
HTTP ERROR: 503
Problem accessing /. Reason:
SERVICE_UNAVAILABLE
Powered by Jetty://
Did I miss something?
You have to generate getters and setters for the variables declared. Could run the application when these are generated.

Weird 404 error in application.log and getting YII to ignore them?

Something is access my site using this URL:
/(Yvax:%20uggc:/jjj.tbbtyr-nanylgvpf.pbz/hepuva.wf)uggc:/jjj.tbbtyr-nanylgvpf.pbz/hepuva.wf
So I get error:
[error] [exception.CHttpException.404] exception 'CHttpException'
Is it something to worry about?
How can I stop YII from reporting on this specific error and other similar 404 errors that are unwanted?
Probably just a scanner script. We get hit by these all the time. Review security, but as long as that checks out you should be fine.