Skip to content

ServiceProvider's bootWhen method with serviceProvider arg always being undefined #4524

Answered by sebastijankuzner
c0nsol3 asked this question in Q&A
Discussion options

You must be logged in to vote

I suspect that you changed the plugin order in app.json file. Can you check that?

Generally you don't need to wait to specific serviceProvider to be booted. The boot process will boot them in the same order as they are provided in app.json.

It is possible that you located your plugin after the @arkecosystem/core-blockchainand this mean that core-blockchain is booted before the handler for your plugin is registered, which results in a missing event, where serviceProvider variable should be equal @arkecosystem/core-blockchain.

Approach when your plugin depends on another serviceProvider is recommended when dependent plugin is disposed and then booted again, but not on the initial boot.

Replies: 2 comments 3 replies

Comment options

You must be logged in to vote
1 reply
@KovacZan
Comment options

Comment options

You must be logged in to vote
2 replies
@c0nsol3
Comment options

@faustbrian
Comment options

Answer selected by c0nsol3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
4 participants