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

Swift Example not working #76

Open
SwiftDeveloper990 opened this issue Jan 8, 2025 · 2 comments
Open

Swift Example not working #76

SwiftDeveloper990 opened this issue Jan 8, 2025 · 2 comments
Labels
bug Something isn't working

Comments

@SwiftDeveloper990
Copy link

SwiftDeveloper990 commented Jan 8, 2025

Describe the bug
A clear and concise description of what the bug is.

SDK Version

  • Client: Swift
  • Version 1.2.1

To Reproduce
Steps to reproduce the behavior:

  1. Checked out this project
  2. Launched project in xcode
  3. Built project
  4. Changed team id to mine, entered my reown project id in the plis.
  5. Registered app group
  6. Modified app group in Networking initialization
  7. Launched AppKitLab on my iPhone.
  8. Socket connected successfully, green circle on top
  9. When connecting to metamask I'm able to connect wallet with authRequestParams set to nil
  10. Any other action after that I get:
    🔐 [Serializer.swift]: Decoded: RPCResponse(jsonrpc: "2.0", id: Optional(1736308856526071), outcome: JSONRPC.RPCResult.error(JSONRPC.JSONRPCError(code: 1, message: "Invalid Id", data: nil))) - handleType0Envelope(::) - line: 97
  11. If I use authRequestParams as .stub() again I'm able to connect but the next sign function throws Invalid Id

🔐 [Serializer.swift]: {"id":1736308856526071,"jsonrpc":"2.0","error":{"code":1,"message":"Invalid Id"}} - decode(sealbox:symmetricKey:) - line: 152
🔐 [Serializer.swift]: keyNotFound(CodingKeys(stringValue: "method", intValue: nil), Swift.DecodingError.Context(codingPath: [], debugDescription: "No value associated with key CodingKeys(stringValue: "method", intValue: nil) ("method").", underlyingError: nil)) - handleType0Envelope(::) - line: 101
RPCResponse
🔐 [Serializer.swift]: Decoded: RPCResponse(jsonrpc: "2.0", id: Optional(1736308856526071), outcome: JSONRPC.RPCResult.error(JSONRPC.JSONRPCError(code: 1, message: "Invalid Id", data: nil))) - handleType0Envelope(::) - line: 97

Additionally on the initial connect the AppMetadata is not being passed to metamask. Metamask shows the connection as "null wants to connect".

Expected behavior
Connection and socket communication between metamask and wallet connect should work.

Screenshots
Problem1
Problem2

Device (please complete the following information):

  • Device: IPhone 13 Pro
  • OS: 17.6.1

Additional context
Add any other context about the problem here.

@SwiftDeveloper990 SwiftDeveloper990 added the bug Something isn't working label Jan 8, 2025
Copy link

linear bot commented Jan 8, 2025

@prakash-ixfi
Copy link

Facing same issue with below method

try await AppKit.instance.request(.eth_sendTransaction(...))

-: ERROR :-

🔐 [Serializer.swift]: {"id":1737432118410326,"jsonrpc":"2.0","error":{"code":1,"message":"Invalid Id"}} - decode(sealbox:symmetricKey:) - line: 152 - 2025-01-21 09:32:00
🔐 [Serializer.swift]: keyNotFound(CodingKeys(stringValue: "method", intValue: nil), Swift.DecodingError.Context(codingPath: [], debugDescription: "No value associated with key CodingKeys(stringValue: "method", intValue: nil) ("method").", underlyingError: nil)) - handleType0Envelope(::) - line: 101 - 2025-01-21 09:32:00
RPCResponse
🔐 [Serializer.swift]: Decoded: RPCResponse(jsonrpc: "2.0", id: Optional(1737432118410326), outcome: JSONRPC.RPCResult.error(JSONRPC.JSONRPCError(code: 1, message: "Invalid Id", data: nil))) - handleType0Envelope(::) - line: 97 - 2025-01-21 09:32:00

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants