Open JafarAkhondali opened 4 months ago
Hello Khaled, Thanks for your help!
I believe the ID (not sure about the "key") changes with different installations on different systems. The Id that have been hardcoded before, was obtained after install extension from the web store, in the browser. Also, I forgot to mention that the manifest.json
here is not required and must be removed. Firefox and chrome have different manifest, only the code is shared. you can see it in: https://github.com/persepolisdm/Persepolis-WebExtension/blob/master/packager.sh
If you achieve a stable connection, try to debug other features of extension on both browsers. Like these features:
Hello Khaled, Thanks for your help!
I believe the ID (not sure about the "key") changes with different installations on different systems. The Id that have been hardcoded before, was obtained after install extension from the web store, in the browser. Also, I forgot to mention that the
manifest.json
here is not required and must be removed. Firefox and chrome have different manifest, only the code is shared. you can see it in: https://github.com/persepolisdm/Persepolis-WebExtension/blob/master/packager.sh
hey , yeah the key here is for debugging purposes only by including the key, the extension id stays the same as hardcoded in persopolis(the web store's id) This was the problem the native messaging was broken. I doubt there's any other issue about the connection as I've got a pretty stable one. But I'll test and update further along the way. #58
When packaging the extension and uploading it to the store , the key will be same as defined in persopolis without that manifest.json var anyway.
Hey, When you can, please review #58
I'll began cleaning / refactoring some stuffs after your review.
Thanks
Progress![image](https://github.com/persepolisdm/Persepolis-WebExtension/assets/74397286/903e8f28-ea06-44db-a58a-55a07fe70e9f)
It seems like persopolis creates / overwrites
pdmchromewrapper.json
somewhere. And the extension Id's doesn't match For now I've createdcom.persepolis.pdmchromewrapperv3.json
with new extension idChanged honsName in backgrund.js to
const hostName = 'com.persepolis.pdmchromewrapperv3';
And patched some broken api (dirty fix) to check the connection. It seems to work
https://github.com/persepolisdm/persepolis/blob/658fed8601d6defd79f38923c3e0905b0d8bf63f/persepolis/scripts/browser_integration.py#L158 There must be another way instead of hardcoding the extension id ?? right??
Found a way
edit manifest to include
And the id will be same as current persopolis extension The key is the public key of current extension btw. Got by running
chrome.runtime.getManifest().key