Skip to content

The given key 'key' was not present in the dictionary (at GenerateKey) #8

Open
@JCKodel

Description

@JCKodel

While running this code (using the Emitter nuget on a .net core console project):

var emitter = new Emitter.Connection();

emitter.Connect();

emitter.GenerateKey("MY_SECRET_KEY_COPIED_FROM_CONSOLE", "chat/", Emitter.Messages.EmitterKeyType.ReadWrite, (r) =>
{
        // This never runs
	Console.WriteLine(r.Status + ": " + r.Key);
});

this error is thrown:

Error: System.Collections.Generic.KeyNotFoundException: The given key 'key' was not present in the dictionary.
   at System.Collections.Generic.Dictionary`2.get_Item(TKey key)
   at Emitter.Messages.KeygenResponse.FromJson(String json) in C:\projects\csharp-133tg\Emitter\Messages\KeygenResponse.cs:line 50
   at Emitter.Connection.OnMessageReceived(Object sender, MqttMsgPublishEventArgs e) in C:\projects\csharp-133tg\Emitter\Emitter.cs:line 427

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions