You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After adding a custom capability provider through the Dashboard UI, I noticed that the newly added provider remains in the Awaiting state.
When trying to access the always-waiting provider through an actor call -- I receive the following error
Actor call without provider interaction works successfully.
Btw, tried to decode given array of integers with msgpack, received: "73". Very helpful 👍
Provider interface:
...
@wasmbus(
contractId: "wasmcloud:examples:hashes",
actorReceive: true,
providerReceive: true )
serviceHashes {
version: "0.1",
operations: [ Calculate ]
}
/// Calculates the hash of given passwordoperationCalculate {
input: GenerateHashRequest,
output: GenerateHashResponse,
}
/// Parameters sent for GenerateHashstructureGenerateHashRequest {
/// Name of hash function to generate hash
@requiredhashMethod: String,
/// The password string that will be hashed
@requiredpasswordString: String,
}
/// Response to GenerateHashstructureGenerateHashResponse {
/// Indicates a successful generating
@requiredsuccess: Boolean,
/// String with password hashpasswordHash: String,
/// Optional string with fail reasonfailReason: String,
}
Actor to provider call: hash_type and msg variables are strings
fnmain() -> Result<(),Box<dyn std::error::Error>>{provider_main(HashesProviderProvider::default(),Some("HashesProvider".to_string()))?;eprintln!("hashes-provider provider exiting");Ok(())}#[derive(Default,Clone,Provider)]#[services(Hashes)]structHashesProviderProvider{}implProviderDispatchforHashesProviderProvider{}implProviderHandlerforHashesProviderProvider{}#[async_trait]implHashesforHashesProviderProvider{/// accepts a password and generate its hashasyncfncalculate(&self,_ctx:&Context,_arg:&GenerateHashRequest) -> RpcResult<GenerateHashResponse>{debug!("generating hash for string {}", _arg.password_string.clone());Ok(gen_hash(_arg))}}
I've also noticed that when I try to remove the provider through the dashboard UI, I get a log message telling me that the process doesn't exist:
process2023-04-10T13:07:15.182753Z INFO wasmbus_rpc::provider: Received termination signal and stopping
hashes-provider provider exiting
kill: (2240924): No such process
Environment
Was running wasmcloud_host locally.
OS: Linux
Arch: x86_64
wasmCloud Version: 0.62.0
The text was updated successfully, but these errors were encountered:
Thanks for the report @VanjaRo. We'll look into how the host is reporting errors; that byte array should be deserialized as a string. It's not messagepack-encoded, by the way, just plain text. I decoded it for you in my browser:
[73,110,118,111,99,97,116,105,111,110,32,110,111,116,32,97,117,116,104,111,114,105,122,101,100,58,32,109,105,115,115,105,110,103,32,108,105,110,107,32,100,101,102,105,110,105,116,105,111,110,32,102,111,114,32,119,97,115,109,99,108,111,117,100,58,101,120,97,109,112,108,101,115,58,104,97,115,104,101,115,32,111,110,32,100,101,102,97,117,108,116].map(c=>String.fromCharCode(c)).join('')'Invocation not authorized: missing link definition for wasmcloud:examples:hashes on default'
So for your specific error, this means the host didn't detect a link between your actor and provider for the contract wasmcloud:examples:hashes with the name default
Describe the bug
After adding a custom capability provider through the
Dashboard UI
, I noticed that the newly added provider remains in theAwaiting
state.When trying to access the always-waiting provider through an actor call -- I receive the following error
Actor call without provider interaction works successfully.
Btw, tried to decode given array of integers with
msgpack
, received: "73". Very helpful 👍Provider interface:
Actor to provider call:
hash_type
andmsg
variables are stringsProvider core logic:
I've also noticed that when I try to remove the
provider
through thedashboard UI
, I get a log message telling me that the process doesn't exist:Environment
Was running wasmcloud_host locally.
The text was updated successfully, but these errors were encountered: