Groups keyboard shortcuts have been updated
Dismiss
See shortcuts

nativeApplication : Service worker can send messages, but stops receiving them after a while

74 views
Skip to first unread message

DevHexa

unread,
Apr 29, 2025, 5:39:47 PM (14 days ago) Apr 29
to Chromium Extensions

Hello,

I start a native application with runtime.connectNative , send and receive message without error.

After a while, i can still send messages to my native application, but no longer receives any. The port still seems active; I don't get any errors.The port.onDisconnect.addListener trigger is never activated. 

port.onMessage.hasListeners() return true. 

If I force a reconnection to my native application (runtime.connectNative), everything works again with the same message (send and receive). 

Have you ever had this problem? If not, how can I know when to reconnect to my native application?


Eric Lawrence

unread,
Apr 29, 2025, 8:47:01 PM (14 days ago) Apr 29
to DevHexa, Chromium Extensions
In case it's useful (and if you're using Windows), you might try

--
You received this message because you are subscribed to the Google Groups "Chromium Extensions" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chromium-extens...@chromium.org.
To view this discussion visit https://groups.google.com/a/chromium.org/d/msgid/chromium-extensions/016efe87-fdca-4bd1-9dd2-e4469937a53bn%40chromium.org.

DevHexa

unread,
May 6, 2025, 6:22:23 AM (7 days ago) May 6
to Chromium Extensions, Eric Lawrence, Chromium Extensions, DevHexa
Hello,
Thanks Eric for the suggestion.
A precision :
My native application is a C++ application for 32-bit Windows, my Chrome application is a 64-bit Windows application.
I didn't see anywhere that the native application had to be 64-bit, but now that Windows OS are 64-bit maybe it's implicit... 
Reply all
Reply to author
Forward
0 new messages