Skip to content
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

Plugin failing after seneca/ seneca-entity upgrade #34

Open
uover822 opened this issue Jun 29, 2023 · 2 comments
Open

Plugin failing after seneca/ seneca-entity upgrade #34

uover822 opened this issue Jun 29, 2023 · 2 comments

Comments

@uover822
Copy link

Hi,
After applying some seneca upgrades, as:

@seneca/user ^6.2.0 → ^6.3.0
seneca 3.30.1 → 3.31.1
seneca-entity 22.1.0 → 23.0.0
seneca-promisify ^3.4.0 → ^3.5.0

I'm getting the following errors:

{"kind":"fatal","level":600,"plugin":"seneca","tag":"3.31.1","id":"ltdtbxudl0rb/1688045676421/36470/3.31.1/store","code":"plugin_define_failed","notice":"seneca: The definition action for the plugin jsonfile-store has failed: Cannot read properties of undefined (reading 'init') (jsonfile-store.js:324:32). This error is considered fatal as all plugins have to initialize correctly. You should test the plugin by itself to verify that it is working correctly. Also ensure that the configuration options passed to the plugin are correct. These are shown below under in the DETAILS section. There could also be a bug in the plugin. If you think that is the case, please create a github issue on the plugin's repository, and include this error report.","err":{"eraro":true,"orig":{},"code":"plugin_define_failed","seneca":true,"package":"seneca","msg":"seneca: The definition action for the plugin jsonfile-store has failed: Cannot read properties of undefined (reading 'init') (jsonfile-store.js:324:32). This error is considered fatal as all plugins have to initialize correctly. You should test the plugin by itself to verify that it is working correctly. Also ensure that the configuration options passed to the plugin are correct. These are shown below under in the DETAILS section. There could also be a bug in the plugin. If you think that is the case, please create a github issue on the plugin's repository, and include this error report.","details":{"fullname":"jsonfile-store","message":"Cannot read properties of undefined (reading 'init') (jsonfile-store.js:324:32)","options":{"folder":"/opt/msr/data"},"repo":"","errmsg":"Cannot read properties of undefined (reading 'init')","errline":"at jsonfile-store (/opt/msr/store/node_modules/seneca-jsonfile-store/jsonfile-store.js:324:32)","orig$":{},"message$":"Cannot read properties of undefined (reading 'init')"},"callpoint":"at jsonfile-store (/opt/msr/store/node_modules/seneca-jsonfile-store/jsonfile-store.js:324:32)","plugin":"jsonfile-store","plugin_callpoint":"at Object. (/opt/msr/store/srv/store-dev.js:6:4)","fatal$":true},"isot":"2023-06-29T13:34:37.072Z","when":1688045677072,"level_name":"fatal","seneca_id":"ltdtbxudl0rb/1688045676421/36470/3.31.1/store"}

The related source file/ line looks like:

var storedesc = seneca.store.init(seneca, options, store)

{"kind":"fatal","level":600,"plugin":"seneca","tag":"3.31.1","id":"d150rqc1257t/1688045677492/36471/3.31.1/web","code":"plugin_define_failed","notice":"seneca: The definition action for the plugin jsonfile-store has failed: Cannot read properties of undefined (reading 'init') (jsonfile-store.js:304:32). This error is considered fatal as all plugins have to initialize correctly. You should test the plugin by itself to verify that it is working correctly. Also ensure that the configuration options passed to the plugin are correct. These are shown below under in the DETAILS section. There could also be a bug in the plugin. If you think that is the case, please create a github issue on the plugin's repository, and include this error report.","err":{"eraro":true,"orig":{},"code":"plugin_define_failed","seneca":true,"package":"seneca","msg":"seneca: The definition action for the plugin jsonfile-store has failed: Cannot read properties of undefined (reading 'init') (jsonfile-store.js:304:32). This error is considered fatal as all plugins have to initialize correctly. You should test the plugin by itself to verify that it is working correctly. Also ensure that the configuration options passed to the plugin are correct. These are shown below under in the DETAILS section. There could also be a bug in the plugin. If you think that is the case, please create a github issue on the plugin's repository, and include this error report.","details":{"fullname":"jsonfile-store","message":"Cannot read properties of undefined (reading 'init') (jsonfile-store.js:304:32)","options":{"folder":"/opt/msr/data"},"repo":"","errmsg":"Cannot read properties of undefined (reading 'init')","errline":"at jsonfile-store (/opt/msr/web/node_modules/seneca-jsonfile-store/jsonfile-store.js:304:32)","orig$":{},"message$":"Cannot read properties of undefined (reading 'init')"},"callpoint":"at jsonfile-store (/opt/msr/web/node_modules/seneca-jsonfile-store/jsonfile-store.js:304:32)","plugin":"jsonfile-store","plugin_callpoint":"at Object. (/opt/msr/web/srv/web-dev.js:8:4)","fatal$":true},"isot":"2023-06-29T13:34:37.705Z","when":1688045677705,"level_name":"fatal","seneca_id":"d150rqc1257t/1688045677492/36471/3.31.1/web"}

The related source file/ line looks like:

if (good(args, err, cb)) {

Are there new properties/ options to be added?

Are there others seeing? Please let me know of any updates/ ideas.

Thanks

@uover822
Copy link
Author

May relate to senecajs/seneca-store-test#47, as similar issue.

@uover822
Copy link
Author

uover822 commented Jul 9, 2023

Hi :-) Fwiw, it appears this issue can remediated by adding/ updating the following lines in jsonfile-store.js

let init = seneca.export('entity/init') // ln ~33
var storedesc = init(seneca, options, store) // ln ~305

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant