Closed hrueger closed 1 year ago
One more thing: I also get lots of those errors after the error above:
Uncaught Error (but reported silently): Timeout when trying to restart after 1000 {
originalException: 'Timeout when trying to restart after 1000',
syntheticException: Error: Timeout when trying to restart after 1000
at Hub.captureException (C:\Program Files\Glue\resources\app.asar\node_modules\@sentry\hub\cjs\hub.js:131:30)
at Object.captureException (C:\Program Files\Glue\resources\app.asar\node_modules\@sentry\hub\cjs\exports.js:20:30)
at process.<anonymous> (C:\Program Files\Glue\resources\app.asar\dist\index.js:41:25801)
at process.emit (node:events:539:35)
at process.emit (node:domain:475:12)
at emit (node:internal/process/promises:140:20)
at processPromiseRejections (node:internal/process/promises:269:11)
at processTicksAndRejections (node:internal/process/task_queues:97:32)
at runNextTicks (node:internal/process/task_queues:65:3)
at process.processTimers (node:internal/timers:499:9),
captureContext: undefined,
event_id: 'af7edbbd7f4d40f1913b071131da10db'
}
This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). The promise rejected with the reason:
Timeout when trying to restart after 1000
(node:9088) UnhandledPromiseRejectionWarning: Timeout when trying to restart after 1000
(node:9088) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 5)
I'm not sure if they also come from atem-connection
or from sentry, but maybe it's a hint.
It works fine when packed if I use disableMultithreaded: true
in the constructor options, which I guess makes sense.
Maybe we should move this issue to the threadedclass repo?
Currently trying to find out why the connect promise never resolves nor rejects.
I'm just gonna post this here too (as I'm still not sure whether it's a bug of threadedclass
or of its usage in atem-connection
:
Although I didn't expect that to also happen in a minimal sample with just the
atem-connection
library, I was actually able to create a reproduction with less then 20 lines of code: https://github.com/hrueger/threadedclass-issue-74 I hope that helps!
Have you looked at what companion is going? That is using v3.1.2 of atem-connection and noone has reported any issues with it
Good idea.
Maybe it is connected to some dependency update, like electron
or electron-builder
. I know that it was working for me until a couple of versions ago. It's just hard to find what makes the difference in a diff of more than 300 commits ;-)
I noticed that companion is using electron 13. I'll try with that one.
This seems to be the right direction! It's working with electron@13.6.9
.
However, downgrading to this is unfortunately not possible for me. I'll try and find the exact version where it breaks. I believe I've been using electron@17
until recently when I upgraded to electron@20
.
Edit: Maybe it's a fault of electron-builder
. Will check that later today.
The electron version sounds like a strange this to break it, but its possible... threadedclass sounds more likely to me, or electron-builder
electron-builder
is probably not the issue, as the comination electron@13
and electron-builder@23.6.0
works.
Continuing at https://github.com/nytamin/threadedClass/issues/74
Closing this as it is definitely not a problem of atem-connection
.
I'm submitting a ... [x] bug report [ ] feature request [ ] question about the decisions made in the repository [ ] question about how to use this project
Summary
Hi all, I just ran into a very strange problem. The ATEM functionality in my application is working, if i start it in dev mode (using node or electron does not matter). However, when it is packed (using
electron-builder
), the promise of theatem.connect()
method never resolves nor rejects. To me, that sounds like a problem with the libraries being packed into an asar file, so I went ahead and added the following libraries toasarUnpack
:However, this does not change anything.
Even more strange things: I got lots of crash reports with the following error:
However, I could only reproduce that error on my machine once and not anymore (?).
Do you have any clue what could be the problem? It's probably not my bundler (esbuild) as (I) I've marked all packages as external and (II) it works if started with
electron dist/index.ts
.I'm using
"atem-connection": "3.1.2"
and"electron": "20.3.8"
.The only idea I have is going back version by version until it works again and then trying to figure out what has changed.