It is possible that messages (including method calls) are sent before the package is initialized.
Currently, in this case we get an error in the methodName template helper, that is unable to get the method name when a result arrives.
In my case, autoupdate, accounts-base and ddp itself send messages before ddp-inspector wraps the ddp methods.
It currently seems that there is no reasonable way to force the package to load before certain packages, as noted in https://github.com/meteor/meteor/issues/3781 (and even if there were, it could complicate the dependency graph).
It might be possible to get the method name from the ddp connection's _outstandingMethodBlocks, which contains methods that have outstanding callbacks.
My current solution is to cache those method names when the package loads. If the method call is not registered by ddp-inspector (and therefore it is not in the collection), we try searching for it in the cache, and if that fails, display (unknown method).
It is possible that messages (including method calls) are sent before the package is initialized.
Currently, in this case we get an error in the
methodName
template helper, that is unable to get the method name when a result arrives.In my case,
autoupdate
,accounts-base
andddp
itself send messages before ddp-inspector wraps the ddp methods.It currently seems that there is no reasonable way to force the package to load before certain packages, as noted in https://github.com/meteor/meteor/issues/3781 (and even if there were, it could complicate the dependency graph).
It might be possible to get the method name from the ddp connection's
_outstandingMethodBlocks
, which contains methods that have outstanding callbacks.My current solution is to cache those method names when the package loads. If the method call is not registered by ddp-inspector (and therefore it is not in the collection), we try searching for it in the cache, and if that fails, display
(unknown method)
.