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

Compliance with RSL1m1 spec - Message should fill clientId, if unavailable, from Rest/Realtime instance #1108

Closed
tiholic opened this issue Mar 22, 2021 · 1 comment · Fixed by #1110
Assignees

Comments

@tiholic
Copy link

tiholic commented Mar 22, 2021

Ably SDK: 1.2.3
iOS Simulator: iOS14.2
Cocoa Pods: 1.9.3
XCode: Xcode 12.2

What did you do?

  1. Created a Rest instance with clientId specified in ClientOptions.
  2. Published a message without clientId.
  3. Queried history

What did you expect to happen?

That message from history has clientId specified under ClientOptions passed to Rest instance.

What happened instead?

clientId was null.

Spec:

[RSL1m1](https://docs.ably.io/client-lib-development-guide/features/#RSL1m1) Publishing a Message with no clientId when the clientId is set to some value in the client options should result in a message received with the clientId property set to that value

2021-03-15 00:14:21.274766+0530 Runner[43325:500468] VERBOSE: (ARTRest.m:173) RS:0x600001d282d0 0x600002f4aaa0 alloc HTTP
2021-03-15 00:14:21.283372+0530 Runner[43325:500468] DEBUG: (ARTAuth.m:156) RS:0x600001d282d0 validating <ARTClientOptions: 0x7fd89805e810> - 
	 key: dBjBRg.vGOaQw:E7zmEdjv0tAVEgZ6; 
	 token: (null); 
	 authUrl: (null); 
	 authMethod: GET; 
	 hasAuthCallback: 0;
	 clientId: client-id-1;
2021-03-15 00:14:21.283641+0530 Runner[43325:500468] DEBUG: (ARTAuth.m:162) RS:0x600001d282d0 setting up auth method Basic (anonymous)
2021-03-15 00:14:21.292474+0530 Runner[43325:500468] VERBOSE: (ARTRest.m:190) RS:0x600001d282d0 initialized
2021-03-15 00:14:21.342720+0530 Runner[43325:500468] AblyFlutterPlugin.m:605 publish(AblyFlutterMessage)
2021-03-15 00:14:21.344562+0530 Runner[43325:500468] DEBUG: (ARTRestChannel.m:128) RS:0x600000b026a0 instantiating under 'test-channel'
2021-03-15 00:14:21.353693+0530 Runner[43325:501854] VERBOSE: RS:0x600001d282d0 ARTJsonLikeEncoder<msgpack>: messageToDictionary {
    data = Flutter;
    id = "AIytm8/60Nr0:0";
    name = Hello;
}
2021-03-15 00:14:21.356569+0530 Runner[43325:501854] DEBUG: RS:0x600001d282d0 ARTJsonLikeEncoder<msgpack> encoding '(
        {
        data = Flutter;
        id = "AIytm8/60Nr0:0";
        name = Hello;
    }
)'; got: {length = 44, bytes = 0x9183a269 64ae4149 79746d38 2f36304e ... 6d65a548 656c6c6f }
2021-03-15 00:14:21.358105+0530 Runner[43325:501854] DEBUG: (ARTRestChannel.m:314) RS:0x600001d282d0 C:0x600000b026a0 (test-channel) post message (null)
2021-03-15 00:14:21.358972+0530 Runner[43325:501854] DEBUG: (ARTRest.m:249) RS:0x600001d282d0 calculating authorization 0
2021-03-15 00:14:21.359660+0530 Runner[43325:501854] VERBOSE: RS:0x600001d282d0 ARTRest: Basic ZEJqQlJnLnZHT2FRdzpFN3ptRWRqdjB0QVZFZ1o2
2021-03-15 00:14:21.362156+0530 Runner[43325:501854] DEBUG: (ARTRest.m:300) RS:0x600001d282d0 executing request <NSMutableURLRequest: 0x600002d19e50> { URL: https://rest.ably.io:443/channels/test-channel/messages }
2021-03-15 00:14:21.362605+0530 Runner[43325:501854] DEBUG: --> POST https://rest.ably.io:443/channels/test-channel/messages
  Body: kYOiaWSuQUl5dG04LzYwTnIwOjCkZGF0YadGbHV0dGVypG5hbWWlSGVsbG8=
  Headers: {
    Accept = "application/x-msgpack,application/json";
    Authorization = "Basic ZEJqQlJnLnZHT2FRdzpFN3ptRWRqdjB0QVZFZ1o2";
    "Content-Type" = "application/x-msgpack";
    "X-Ably-Lib" = "cocoa.ios-1.2.3";
    "X-Ably-Version" = "1.2";
}
2021-03-15 00:14:21.594465+0530 Runner[43325:501051] [] nw_protocol_get_quic_image_block_invoke dlopen libquic failed
2021-03-15 00:14:21.890090+0530 Runner[43325:501869] DEBUG: <-- POST https://rest.ably.io:443/channels/test-channel/messages: statusCode 201
  Data: gqdjaGFubmVsrHRlc3QtY2hhbm5lbKltZXNzYWdlSWSsQUl5dG04LzYwTnIw
  Headers: {
    "Access-Control-Allow-Origin" = "*";
    "Content-Length" = 45;
    "Content-Type" = "application/x-msgpack";
    Date = "Sun, 14 Mar 2021 18:44:22 GMT";
    Vary = Origin;
    Via = "1.1 7faa1c5ae907f9179032ba018439b4a7.cloudfront.net (CloudFront)";
    "access-control-allow-credentials" = true;
    "access-control-expose-headers" = "Link,Transfer-Encoding,Content-Length,X-Ably-ErrorCode,X-Ably-ErrorMessage,X-Ably-ServerId,Server";
    "x-ably-serverid" = "frontend.630f.2.ap-southeast-1-A.i-0f5bf93e25a13dd17.a2dv0UtMAAvv9w";
    "x-amz-cf-id" = "AtUZp3I6fhrYEFR97pTx6cy_saYkTrj_JM1SiMzI0ptaTEpimjp_Wg==";
    "x-amz-cf-pop" = "HYD50-C1";
    "x-cache" = "Miss from cloudfront";
}

Discussion reference

┆Issue is synchronized with this Jira Uncategorised by Unito

@ricardopereira
Copy link
Contributor

The library is missing RSA7e, that's why the clientId is missing.

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

Successfully merging a pull request may close this issue.

2 participants