Cannot cleanup: TypeError: Cannot read property 'provider' of null
See original GitHub issue- Version: 22.4.0
- Target: MacOS default
Trying to run minimal setup:
# in an empty directory
npm init --yes
npm install --save-dev electron electron-builder
echo "console.log('foo')" >> index.js
npx electron-builder
I get the following (formatted as output by electron-builder, some personal data censored):
• electron-builder version=22.4.0 os=18.7.0
• description is missed in the package.json appPackageFile=/path/to/app/package.json
• writing effective config file=dist/builder-effective-config.yaml
• packaging platform=darwin arch=x64 electron=8.1.1 appOutDir=dist/mac
• default Electron icon is used reason=application icon is not set
• Cannot detect repository by .git/config. Please specify "repository" in the package.json (https://docs.npmjs.com/files/package.json#repository).
Please see https://electron.build/configuration/publish
• skipped macOS application code signing reason=cannot find valid "Developer ID Application" identity or custom non-Apple code signing certificate, see https://electron.build/code-signing allIdentities=
... personal data removed ...
5 identities found
Valid identities only
0 valid identities found
• building target=macOS zip arch=x64 file=dist/builder-1.0.0-mac.zip
• building target=DMG arch=x64 file=dist/builder-1.0.0.dmg
• building block map blockMapFile=dist/builder-1.0.0.dmg.blockmap
• Cannot detect repository by .git/config. Please specify "repository" in the package.json (https://docs.npmjs.com/files/package.json#repository).
Please see https://electron.build/configuration/publish
• Cannot detect repository by .git/config. Please specify "repository" in the package.json (https://docs.npmjs.com/files/package.json#repository).
Please see https://electron.build/configuration/publish
• building embedded block map file=dist/builder-1.0.0-mac.zip
• Cannot detect repository by .git/config. Please specify "repository" in the package.json (https://docs.npmjs.com/files/package.json#repository).
Please see https://electron.build/configuration/publish
⨯ Cannot cleanup:
Error #1 --------------------------------------------------------------------------------
TypeError: Cannot read property 'provider' of null
at createUpdateInfoTasks (/path/to/app/node_modules/app-builder-lib/src/publish/updateInfoBuilder.ts:110:44)
at processTicksAndRejections (internal/process/task_queues.js:93:5)
Error #2 --------------------------------------------------------------------------------
TypeError: Cannot read property 'provider' of null
at createUpdateInfoTasks (/path/to/app/node_modules/app-builder-lib/src/publish/updateInfoBuilder.ts:110:44)
at processTicksAndRejections (internal/process/task_queues.js:93:5) stackTrace=
Error: Cannot cleanup:
Error #1 --------------------------------------------------------------------------------
TypeError: Cannot read property 'provider' of null
at createUpdateInfoTasks (/path/to/app/node_modules/app-builder-lib/src/publish/updateInfoBuilder.ts:110:44)
at processTicksAndRejections (internal/process/task_queues.js:93:5)
Error #2 --------------------------------------------------------------------------------
TypeError: Cannot read property 'provider' of null
at createUpdateInfoTasks (/path/to/app/node_modules/app-builder-lib/src/publish/updateInfoBuilder.ts:110:44)
at processTicksAndRejections (internal/process/task_queues.js:93:5)
at throwError (/path/to/app/node_modules/builder-util/src/asyncTaskManager.ts:90:11)
at checkErrors (/path/to/app/node_modules/builder-util/src/asyncTaskManager.ts:53:9)
at AsyncTaskManager.awaitTasks (/path/to/app/node_modules/builder-util/src/asyncTaskManager.ts:58:5)
at PublishManager.awaitTasks (/path/to/app/node_modules/app-builder-lib/src/publish/PublishManager.ts:210:28)
at /path/to/app/node_modules/app-builder-lib/src/index.ts:94:32
at executeFinally (/path/to/app/node_modules/builder-util/src/promise.ts:25:9)
The same happens with some basic project configuration (appId, name and icon) and a proper electron application. It seems some publish configuration is either mandatory despite what the docs say or mishandled. Considering I did not specify any publish options, I don’t think that part of the code was supposed to run in the first place.
Issue Analytics
- State:
- Created 4 years ago
- Reactions:5
- Comments:5
Top Results From Across the Web
Publishing an electron application fails with: Error!! TypeError
Publishing an electron application fails with: Error!! TypeError: Cannot read property 'provider' of null - Stack Overflow. Stack Overflow for Teams – Start ......
Read more >cannot read properties of null (reading 'usecallback') - You.com
I am trying to solve a very weird problem here. Randomly getting TypeError: Cannot read properties of null (reading 'getAttribute') for the Plyr ......
Read more >Cannot read property 'getThreads' of null - Valuable Tech Notes
I have this code, and I'm not getting why the getThreads property is not being read. Is getThreads() deprecated or so? function cleanUp()...
Read more >Cannot read properties of null (reading 'contains')error in react ...
TypeError : Cannot read properties of null (reading 'contains'), Need useEffect Cleanup,EventBubblingtypeerror cannot read property of null ...
Read more >A Definitive Guide to Handling Errors in JavaScript - Kinsta
TypeError : Cannot read property 'length'. This error occurs in Chrome when you try to read the length of a null or undefined...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I managed to get around this error with specifying publish to be null.
` ⨯ Cannot cleanup:
Error #1 -------------------------------------------------------------------------------- TypeError: Cannot read property ‘provider’ of null at createUpdateInfoTasks (/Users/zero/yh/gitlab/windows-pos-h5.git/node_modules/app-builder-lib/src/publish/updateInfoBuilder.ts:110:44)
Error #2 -------------------------------------------------------------------------------- TypeError: Cannot read property ‘provider’ of null at createUpdateInfoTasks (/Users/zero/yh/gitlab/windows-pos-h5.git/node_modules/app-builder-lib/src/publish/updateInfoBuilder.ts:110:44) stackTrace= ` My solution is change package.json, set publish to be null.