[Manifest V2 to V3 migration] - "This extension may have been corrupted" when modifying Extension directory

104 views
Skip to first unread message

Robson von Brum

unread,
Oct 31, 2024, 4:24:08 PMOct 31
to Chromium Extensions
I have a Chrome Extension which I've recently migrated from V2 to V3. I faced numerous challenges because I relied on background pages and had to split the code between an off screen document and a service worker through event-driven communication. 

After I figured that out, I published my extension to the store. Mind you that I had no problems during development mode. 

Once my Extension was published, whenever I opened the Application that consumed the extension, it got corrupted.

I identified why it was getting corrupted, and it was because inside the extension directory I have a folder called "data", which is used as a point of communication between the external application and the extension. 

This folder contains files, and each file contains a websocket port. These files are watched by the extension, and whenever they change, my extension reconnects its web sockets to the appropriate port. This is necessary because ports may change during runtime of the external application. Essentially, the external application knows the directory of the extension and modifies the files inside the "data" folder. 

My question is, before I change my whole architecture, is there a way or workaround to allow external applications to modify the extension's directory files? This was possible in V2. 


 

Patrick Kettner

unread,
Nov 1, 2024, 11:34:48 AMNov 1
to Robson von Brum, Chromium Extensions
Hi Robson
To be honest, I am really surprised that that would have worked in MV2. There should not be any way to do this, and if there was it would be considered a bug and fixed when found. 

best
patrick

--
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/f65aa3b0-d3f0-491b-8283-eccfcd4dc8e5n%40chromium.org.
Reply all
Reply to author
Forward
0 new messages