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

72 views
Skip to first unread message

DevHexa

unread,
Apr 30, 2025, 12:39:47 AM (9 days ago) Apr 30
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 30, 2025, 3:47:01 AM (9 days ago) Apr 30
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 [email protected].
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, 1:22:23 PM (3 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