app-monorepo icon indicating copy to clipboard operation
app-monorepo copied to clipboard

[Browser Extension]: kindly make the extension available through Mozilla's Extension store

Open thunder-coding opened this issue 2 years ago • 11 comments
trafficstars

Is your feature request related to a problem? Please describe. Chrome Web Store and Microsoft Edge Store both require users to use their own proprietary browser. Trying to install extensions from these sites on Firefox won't work and they will recommend installing their respective browsers.

Describe the solution you'd like Uploading the official extension on Mozilla's extension store will provide users with an option to use OneKey easily. https://addons.mozilla.org/

Describe alternatives you've considered Not Relevant

Community & Quick support

  • Community Forum. Best for: help with building, discussion about best practices.
  • Discord. Best for: sharing your ideas and hanging out with the community.

Additional context https://onekey.so/download/?client=browserExtension

thunder-coding avatar Aug 03 '23 13:08 thunder-coding

At present, because of the build problem, it cannot be approved on Mozilla, and no good method has been found for the time being. We're also happy to offer Firefox extensions.

ByteZhang1024 avatar Aug 03 '23 16:08 ByteZhang1024

At present, because of the build problem, it cannot be approved on Mozilla, and no good method has been found for the time being. We're also happy to offer Firefox extensions.

Can you please elaborate more on what do you mean by "the build problem"?

thunder-coding avatar Aug 03 '23 16:08 thunder-coding

Each build produced different results, and the auditors compiled the source code and the result was inconsistent with the submitted.

https://extensionworkshop.com/documentation/publish/source-code-submission/

ByteZhang1024 avatar Aug 04 '23 01:08 ByteZhang1024

Each build produced different results, and the auditors compiled the source code and the result was inconsistent with the submitted.

https://extensionworkshop.com/documentation/publish/source-code-submission/

Can you tell me what exact step causes this inconsistency, I would like to help since I need this extension. If it is something I can help I'll surely do a PR.

thunder-coding avatar Aug 04 '23 11:08 thunder-coding

The main reason is that the md5 verification of the package we submitted and the package that was typed out after review are inconsistent. We speculate that it is caused by different systems, which may be related to the configuration of webpack packaging. You can start here. Of course, the problem of the Node environment is not ruled out. In short, the same code is printed on different platforms, and the md5 is always the same.

As an aside, there is a very small probability that we will fix this problem in the recent upgrade of webpack5.

Refer to: https://github.com/OneKeyHQ/app-monorepo/pull/2613

ByteZhang1024 avatar Aug 04 '23 12:08 ByteZhang1024

@thunder-coding Hey guys, I've found the reason for the issue. Because there are some random values in the code, it leads to inconsistent hashes for the build artifacts every time. such as: image

I built the source code locally twice, read the MD5 hash of all files, and compared them. As you can see, 22 files have changed in result.

Firefox requires consistency in hash between the source code and the built artifacts. So, we need to remove the random variables from these 22 files. And replace the random values with code versions or Git commit hashes.

 <script src="/preload-html-head.js?<%= currentVersion &>"></script>

Once the reason for the issue is identified, the solution can be implemented quickly, but it will take some time. If possible, we hope you can also join in this modification and assist us in resolving this issue. You can find more details about the work here.(pull request: feat/upgrade-expo)

I hope the above information can be helpful to you. Thank you very much for your attention and support.

huhuanming avatar Aug 09 '23 03:08 huhuanming

How is this reproducible build feature going? Any progress?

Maybe the title of the issue could be improved to "[Browser Extension]: implement reproducible builds to make the extension available through Mozilla's Extension store".

Thanks!!!

ivanbaldo avatar Feb 08 '24 15:02 ivanbaldo

I started using OneKey and would like to get more familiar with the codebase, so I took a look at this low-hanging fruit.

goosewobbler avatar Aug 02 '24 13:08 goosewobbler

Thank you for your PR. We have just refactored the entire project and haven't reviewed it in detail yet. We will evaluate and test it.

ByteZhang1024 avatar Aug 02 '24 13:08 ByteZhang1024