Skip to content
This repository has been archived by the owner on Aug 15, 2023. It is now read-only.

[tk:ext] still failing Mozilla reproducible build #741

Open
vecna opened this issue Oct 19, 2022 · 6 comments
Open

[tk:ext] still failing Mozilla reproducible build #741

vecna opened this issue Oct 19, 2022 · 6 comments
Assignees
Labels
bug Something isn't working build Workspace, packages and platforms build

Comments

@vecna
Copy link
Member

vecna commented Oct 19, 2022

We have tried to build your add-on using the provided sources on Ubuntu 20 using node 16.7.0, yarn 3.0.0, but the process aborted with errors. Please see https://paste.mozilla.org/DDj529vZ for the build output.
Also, please test your build in a clean environment to make sure it is reproducible. If necessary, update the source package and/or the instructions to build.
@vecna vecna added bug Something isn't working build Workspace, packages and platforms build labels Oct 19, 2022
@vecna
Copy link
Member Author

vecna commented Oct 19, 2022

from the log, seems to me, it does break here:

? YN0002: ? ts-node-dev@npm:2.0.0 [dc3fc] doesn't provide @types/node (pa4fb1), requested by ts-node
? YN0000: ? Some peer dependencies are incorrectly met; run yarn explain peer-requirements <hash> for details, where <hash> is the six-letter p-prefixed code

@vecna
Copy link
Member Author

vecna commented Nov 16, 2022

still true

Details:
We have tried to build your add-on using the provided sources on Ubuntu 20 using node 16.7.0, yarn 3.0.0, but the process aborted with errors. Please see https://paste.mozilla.org/mYVKgnaX for the build output.
Also, please test your build in a clean environment to make sure it is reproducible. If necessary, update the source package and/or the instructions to build.

Version(s) affected:
2.7.0

@vecna
Copy link
Member Author

vecna commented Nov 17, 2022

/private/var/folders/xy/35_flc5n4jg7mgdjk8dwqngm0000gq/T/xfs-a3956514/build.log

@ascariandrea ascariandrea assigned chobeat and unassigned ascariandrea Nov 25, 2022
@ascariandrea
Copy link
Collaborator

Instructions for @chobeat:

  • ensure you're running in an environment with node >16 and yarn >3.2.3
  • run the ./scripts/shrink.sh to produce the zip we send to mozilla
  • test with docker-compose up build-from-zip
  • test with ./scripts/install-from-shinkzip.sh ./build/trex.zip ../$whatever_folder_you_want

And you should get no error

@vecna
Copy link
Member Author

vecna commented Nov 29, 2022

This is still failing, to test it:

  1. ./scrips/shrink.sh
  2. mkdir /tmp/blah; mv dist/trex.zip /tmp/blah; cd /tmp/blah; unzip *
  3. yarn
  4. yarn tk:ext dist (this is what is written in the README.md generated for the extension reviewer)

The command produce this errors:

assets by status 588 KiB [cached] 16 assets
orphan modules 5.01 MiB [orphan] 6440 modules
runtime modules 4.31 KiB 16 modules
cacheable modules 1.46 MiB
  modules by path ../../../ 732 KiB
    modules by path ../../../node_modules/ 731 KiB 14 modules
    modules with errors 507 bytes [errors] 13 modules
  modules by path ./src/ 765 KiB
    ./src/app/index.ts + 213 modules 475 KiB [built] [code generated]
    ./src/popup.tsx + 79 modules 185 KiB [built] [code generated] [1 error]
    ./src/background/index.ts + 8 modules 99.7 KiB [built] [code generated]
    + 2 modules
  modules by path ../shared/src/ 78 bytes
    ../shared/src/parser/v2/constant.ts 39 bytes [built] [code generated] [1 error]
    ../shared/src/endpoints/index.ts 39 bytes [built] [code generated] [1 error]
  crypto (ignored) 15 bytes [built] [code generated]

ERROR in ../../../packages/shared/src/endpoints/index.ts
Module build failed (from ../../../node_modules/ts-loader/index.js):
Error: TypeScript emitted no output for /tmp/build/packages/shared/src/endpoints/index.ts. The most common cause for this is having errors when building referenced projects.
    at makeSourceMapAndFinish (/tmp/build/node_modules/ts-loader/dist/index.js:52:18)
    at successLoader (/tmp/build/node_modules/ts-loader/dist/index.js:39:5)
    at Object.loader (/tmp/build/node_modules/ts-loader/dist/index.js:22:5)
 @ ./src/background/api.ts 18:0-55 49:180-198
 @ ./src/background/index.ts 4:0-55 6:9-16 7:4-29

ERROR in ../../../packages/shared/src/extension/app.ts
Module build failed (from ../../../node_modules/ts-loader/index.js):
Error: TypeScript emitted no output for /tmp/build/packages/shared/src/extension/app.ts. The most common cause for this is having errors when building referenced projects.
[...]

Which seems to be a problem of the shared package that needs to be ready before compiling the extension. If this is the bug, it might be solved just by updating the README.md produced by shrink.sh. But:

v :/tmp/build $ yarn shared build
src/providers/mongo.provider.ts:78:3 - error TS2322: Type 'InsertManyResult<Document>' is not assignable to type 'void'.

78   return mongoc.db().collection(cName).insertMany(docs, options);
     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


Found 1 error.

v :/tmp/build $ 

seems I can't build the shared package too from the shrink directory.

@ascariandrea
Copy link
Collaborator

@vecna I opened #818 to fix this

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working build Workspace, packages and platforms build
Projects
None yet
Development

No branches or pull requests

3 participants