Re: [crx] Sending native message from native app to MV3 extension

319 views
Skip to first unread message

Eric Lawrence

unread,
Mar 28, 2022, 11:33:20 PM3/28/22
to KV, Chromium Extensions
Yes, bidirectional messaging works between native hosts and ServiceWorker-backed extensions. 

There is an active bug whereby the connection will be incorrectly closed after five minutes, but it does not sound like what you are running into.

I built a Windows debugger for native messaging, and included a Manifest v3 demo extension; see 


...for details and a link to the GitHub repo. 


On Mon, Mar 28, 2022, 08:23 KV <kvikram...@gmail.com> wrote:
Situation & results so far: I have set up some experiments and was able to send a native message from my MV3 extension to a native app that runs on electron JS. I am able to send replies to the messages I send from the extension to native app too.

Problem: When I try to initiate a message from the native app to the extension, I'm getting this error that says, "the other end of the stream is closed or not present".

Questions: Has anyone come across the same issue or is it even possible to send a message from a native app to extension ?

--
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 on the web visit https://groups.google.com/a/chromium.org/d/msgid/chromium-extensions/77256ce3-7e98-4955-a2b9-477059f504a4n%40chromium.org.

Darbid

unread,
Mar 29, 2022, 12:35:13 AM3/29/22
to Chromium Extensions, bay...@gmail.com, Chromium Extensions, kvikram...@gmail.com
My extension runs for longer than 5 minutes, so After the connection is closed after that 5 minute period what should you do.

KV

unread,
Mar 29, 2022, 7:27:27 AM3/29/22
to Chromium Extensions, maild...@gmail.com, bay...@gmail.com, Chromium Extensions, KV

I'm the author of this question. I was able to figure it out on my own so I deleted the question. The issue was due to console logs I was using in the  code while pushing the message to stdout. That crashed my app and hence the error message as described above. 

For those of you who end up in the same path. Please make sure to avoid writing anything else to the console while reading from or writing to stdio, and also make sure the messages you send back to the extension are JSON stringified.

Thanks,
KV

KV

unread,
Mar 29, 2022, 7:35:10 AM3/29/22
to Chromium Extensions, maild...@gmail.com, bay...@gmail.com, Chromium Extensions, KV
I don't have a solid answer for you, but here is a pointer. Chrome 100 stable will be out on March 29,2022

https://groups.google.com/a/chromium.org/g/chromium-extensions/c/qvzZyVsc1wE/m/fX6h8DhuAAAJ

On Tuesday, March 29, 2022 at 12:35:13 AM UTC-4 maild...@gmail.com wrote:

Darbid

unread,
Mar 30, 2022, 5:37:42 AM3/30/22
to Chromium Extensions, kvikram...@gmail.com, Darbid, bay...@gmail.com, Chromium Extensions
Thank you. Let us see after 100 if it actually works.

Darbid

unread,
Apr 10, 2022, 12:19:11 AM4/10/22
to Chromium Extensions, Darbid, kvikram...@gmail.com, bay...@gmail.com, Chromium Extensions
Too funny the MV3 shit show continues. Native Messaging is STILL broken. 

The Bug request here https://bugs.chromium.org/p/chromium/issues/detail?id=1189678 started over ONE YEAR AGO meaning the change took one year, did NOT fix the problem. This is despite the spoon feeding needed to even get the obvious bug recognised.
Reply all
Reply to author
Forward
0 new messages