OneKeyHQ / app-monorepo

Secure, open source and community driven crypto wallet runs on all platforms and trusted by millions.
https://onekey.so
Other
1.93k stars 365 forks source link

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

Open thunder-coding opened 1 year ago

thunder-coding commented 1 year ago

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

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

ByteZhang1024 commented 1 year ago

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.

thunder-coding commented 1 year ago

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"?

ByteZhang1024 commented 1 year ago

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/

thunder-coding commented 1 year ago

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.

ByteZhang1024 commented 1 year ago

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

huhuanming commented 1 year ago

@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.

ivanbaldo commented 7 months ago

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!!!

goosewobbler commented 1 month ago

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

ByteZhang1024 commented 1 month ago

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.