-
-
Notifications
You must be signed in to change notification settings - Fork 527
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Crashes main thread of Electron App in prod version of app #1198
Comments
Hey @darylcober it's important to validate your assumptions before making such claims, that's the beauty of open source projects. the bugs URL is a static link to GitHub and it is only used in the The package.json definition: Lines 21 to 23 in e99be62
Where it is used: Lines 199 to 212 in 7292734
With that out of the way, let's look at your issue: I think some packaging process is removing the bugs section from the package.json, there is a fix already in place (#984), you can try the version |
@tulios hi -- I'm also interested in this fix, so I'm glad to hear that it's in your pipeline. It does appear that this fix was merged nearly 10 months ago. Do you have a sense of when it will be included in a stable release? I'm just a bit weary about bumping to a beta version. Thanks for your work on this lib man |
This was fixed in 1.16.0 |
Describe the bug
When included in an Electron Build this lib crashes the main thread when app is launched with the following error:
[2021-09-29 22:59:43.642] [error] TypeError: Cannot read property 'url' of undefined
at Object. (C:\Users\xxxr\AppData\Local\Programs\xxx\resources\app.asar\node_modules\kafkajs\src\errors.js:198:31)
at Module._compile (internal/modules/cjs/loader.js:1078:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1108:10)
at Module.load (internal/modules/cjs/loader.js:935:32)
at Module._load (internal/modules/cjs/loader.js:776:14)
at Function.f._load (electron/js2c/asar_bundle.js:5:12684)
at Module.require (internal/modules/cjs/loader.js:959:19)
at require (internal/modules/cjs/helpers.js:88:18)
at Object. (C:\Users\xxx\AppData\Local\Programs\xxx\resources\app.asar\node_modules\kafkajs\src\instrumentation\emitter.js:3:26)
at Module._compile (internal/modules/cjs/loader.js:1078:30)
To Reproduce
Include kafkajs in dependencies of Electron App and build with Electron-Builder
The bug is in kafkajs/src/errors.js at line 198 - const issueUrl = pkgJson.bugs.url
When pkgJson is inspected the following is observed:
[2021-09-29 22:55:25.692] [info] kafka package => {
author: { name: 'Tulio Ornelas', email: '' },
dependencies: {},
description: 'A modern Apache Kafka client for node.js',
devDependencies: {
'@types/node': '^12.0.8',
'@typescript-eslint/typescript-estree': '^1.10.2',
eslint: '^6.8.0',
'eslint-config-prettier': '^6.0.0',
'eslint-config-standard': '^13.0.1',
'eslint-plugin-import': '^2.18.2',
'eslint-plugin-node': '^11.0.0',
'eslint-plugin-prettier': '^3.1.0',
'eslint-plugin-promise': '^4.2.1',
'eslint-plugin-standard': '^4.0.0',
execa: '^2.0.3',
glob: '^7.1.4',
husky: '^3.0.1',
ip: '^1.1.5',
jest: '^25.1.0',
'jest-circus': '^25.1.0',
'jest-extended': '^0.11.2',
'jest-junit': '^10.0.0',
jsonwebtoken: '^8.5.1',
'lint-staged': '^9.2.0',
mockdate: '^2.0.5',
prettier: '^1.18.2',
semver: '^6.2.0',
typescript: '^3.8.3',
uuid: '^3.3.2'
},
engines: { node: '>=10.13.0' },
homepage: 'https://kafka.js.org',
license: 'MIT',
'lint-staged': { '*.js': [ 'prettier --write', 'git add' ] },
main: 'index.js',
name: 'kafkajs',
repository: { type: 'git', url: 'git+https://github.com/tulios/kafkajs.git' },
types: 'types/index.d.ts',
version: '1.15.0'
}
The expected bugs node is not included in the presented data.
Expected behavior
The bugs node should be included or exception handling should be introduced to prevent catastrophic failure.
Environment:
Additional context
It's not cool to have your lib send data outside the app without the users consent!
The text was updated successfully, but these errors were encountered: