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

Crash on IPhone 7 plus #527

Closed
ashishp-dev opened this issue Jun 17, 2024 · 16 comments · Fixed by #528
Closed

Crash on IPhone 7 plus #527

ashishp-dev opened this issue Jun 17, 2024 · 16 comments · Fixed by #528
Assignees
Labels
bug Something isn't working. It's clear that this does need to be fixed.

Comments

@ashishp-dev
Copy link

ashishp-dev commented Jun 17, 2024

[NSTaggedPointerString stringValue]: unrecognized selector sent to instance 0xbeda7c7407f36903
*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[NSTaggedPointerString stringValue]: unrecognized selector sent to instance 0xbeda7c7407f36903'
*** First throw call stack:
(0x180927c60 0x198153ee4 0x1809f86e8 0x1808c154c 0x1808c075c 0x10634145c 0x1808d28c8 0x1809060f8 0x1063411fc 0x106340c6c 0x106318aa4 0x106317504 0x106316ec4 0x1063157ec 0x1805e8094 0x180595964 0x10631576c 0x1063149b0 0x1063140a8 0x10a9359ac 0x10a939638 0x111dd61e4 0x111845794 0x1805e7094 0x1805e8094 0x180594d44 0x180594994 0x1808e3014 0x1808a04f8 0x1808b3174 0x1a13ee988 0x1830b67d8 0x182e4fc70 0x10474901c 0x1060f04d0)
libc++abi: terminating with uncaught exception of type NSException

  • thread Verify Ably as publisher #1, queue = 'io.ably.main', stop reason = signal SIGABRT
    frame #0: 0x00000001bb207bbc libsystem_kernel.dylib__pthread_kill + 8 libsystem_kernel.dylib:
    -> 0x1bb207bbc <+8>: b.lo 0x1bb207bd8 ; <+36>
    0x1bb207bc0 <+12>: stp x29, x30, [sp, #-0x10]!
    0x1bb207bc4 <+16>: mov x29, sp
    0x1bb207bc8 <+20>: bl 0x1bb20360c ; cerror_nocancel
    Target 0: (Soul Train Dev) stopped.

┆Issue is synchronized with this Jira Task by Unito

@VeskeR
Copy link

VeskeR commented Jun 17, 2024

Hi @ashishp-dev !

Could you please provide more context regarding the error? Specifically, what operation are you trying to perform (e.g. publish/receive a message), and which lines of code are causing the app to crash? Additionally, could you let me know what version of ably-flutter you are using?

Thank you!

@ashishp-dev
Copy link
Author

Screenshot 2024-06-17 at 7 13 15 PM

I am using a ably_flutter: ^1.2.32 this flutter version

other IOS device is working fine i am facing this issue on Iphone 7 and iphone 12 only specific IOS related issue
When i check logs i am getting like this

Screenshot 2024-06-17 at 7 20 15 PM

@VeskeR
Copy link

VeskeR commented Jun 17, 2024

On which iOS version does this occur?

@ashishp-dev
Copy link
Author

@VeskeR Any update??

@ttypic
Copy link
Contributor

ttypic commented Jun 18, 2024

Hey @ashishp-dev,

We are still trying to reproduce the issue on our end. To help us understand the exact point at which the error occurs, could you please enable verbose logging and add the logs to the issue report? This would assist us in diagnosing the problem. Additionally, could you let us know if the issue only occurs on a physical device, or if it can be reproduced on an emulator as well?

@ttypic ttypic added the bug Something isn't working. It's clear that this does need to be fixed. label Jun 18, 2024
@ashishp-dev
Copy link
Author

Yes this is happening on the physical device of iPhone 7 plus. Not happening on the simulator.
I am sharing more information

@ashishp-dev
Copy link
Author

I am getting this logs

2024-06-18 15:26:56.644066+0530 Soul Train Dev[34906:1440758] DEBUG: (ARTAuth.m:171) RS:0x280ad03c0 setting up auth method Basic (anonymous)
2024-06-18 15:26:56.644474+0530 Soul Train Dev[34906:1440758] VERBOSE: (ARTRest.m:207) RS:0x280ad03c0 initialized
2024-06-18 15:26:56.644840+0530 Soul Train Dev[34906:1440758] VERBOSE: (ARTRealtime.m:248) R:0x2807d0600 initialized with RS:0x280ad03c0
2024-06-18 15:26:56.644940+0530 Soul Train Dev[34906:1440758] VERBOSE: (ARTRealtime.m:611) R:0x2807d0600 realtime state transitions to 1 - Connecting
2024-06-18 15:26:56.645032+0530 Soul Train Dev[34906:1440758] DEBUG: (ARTRealtime.m:622) RT:0x2807d0600 realtime is transitioning from 0 - Initialized to 1 - Connecting
2024-06-18 15:26:56.645345+0530 Soul Train Dev[34906:1440758] VERBOSE: (ARTWebSocketTransport.m:76) R:0x0 WS:0x281ff9aa0 alloc
2024-06-18 15:26:56.645499+0530 Soul Train Dev[34906:1440758] DEBUG: (ARTWebSocketTransport.m:122) R:0x2807d0600 WS:0x281ff9aa0 websocket connect with key
2024-06-18 15:26:56.645877+0530 Soul Train Dev[34906:1440758] -[NSTaggedPointerString stringValue]: unrecognized selector sent to instance 0x85874b536f59cda2
2024-06-18 15:26:56.646343+0530 Soul Train Dev[34906:1440758] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[NSTaggedPointerString stringValue]: unrecognized selector sent to instance 0x85874b536f59cda2'
*** First throw call stack:
(0x180927c60 0x198153ee4 0x1809f86e8 0x1808c154c 0x1808c075c 0x10281545c 0x1808d28c8 0x1809060f8 0x1028151fc 0x102814c6c 0x1027ecaa4 0x1027eb504 0x1027eaec4 0x1027e97ec 0x1805e8094 0x180595964 0x1027e976c 0x1027e89b0 0x1027e80a8 0x106f759ac 0x106f79638 0x10e8621e4 0x10e2d1794 0x1805e7094 0x1805e8094 0x180594d44 0x180594994 0x1808e3014 0x1808a04f8 0x1808b3174 0x1a13ee988 0x1830b67d8 0x182e4fc70 0x100cc501c 0x1024c44d0)
libc++abi: terminating with uncaught exception of type NSException

  • thread Verify Ably as publisher #1, queue = 'io.ably.main', stop reason = signal SIGABRT
    frame #0: 0x00000001bb207bbc libsystem_kernel.dylib__pthread_kill + 8 libsystem_kernel.dylib:
    -> 0x1bb207bbc <+8>: b.lo 0x1bb207bd8 ; <+36>
    0x1bb207bc0 <+12>: stp x29, x30, [sp, #-0x10]!
    0x1bb207bc4 <+16>: mov x29, sp
    0x1bb207bc8 <+20>: bl 0x1bb20360c ; cerror_nocancel

@ashishp-dev
Copy link
Author

@VeskeR @ttypic Any update??

@ttypic
Copy link
Contributor

ttypic commented Jun 19, 2024

Hey @ashishp-dev,

We still can't reproduce the issue. Could you please share the version of Flutter you are using? Please note that the latest version of Flutter officially supports only iOS 17. Could you also check our example app from this repository? Could you reproduce the issue with it?

@ashishp-dev
Copy link
Author

@ttypic i am using this flutter version (3.22.1)
Screenshot 2024-06-19 at 5 46 20 PM

@ashishp-dev
Copy link
Author

@ttypic @VeskeR

Issue is resolved now when i write client options something like this.

final clientOptions = ably.ClientOptions(
    key: ApiConstant.ABLY_KEY,
    transportParams: {
      'remainPresentFor': remainPresentFor,
      'heartbeatInterval': heartbeatInterval
    },
    clientId: userID,
    logLevel: ably.LogLevel.verbose,
  );

  var realtime = ably.Realtime(key: ApiConstant.ABLY_KEY);
  realtime.options = clientOptions;

when i write like this my iphone 7 is crashing
var realtime = ably.Realtime(key: ApiConstant.ABLY_KEY, options: clientOptions);

@ttypic
Copy link
Contributor

ttypic commented Jun 20, 2024

Thank you for sharing this @ashishp-dev. Now I got it,

ably.Realtime(key: ApiConstant.ABLY_KEY, options: clientOptions);

You can't use it like this. You should specify either key or options, not both. If you specify both arguments, key will be ignored. Additionally, if you don't specify key or other authentication parameters inside your ClientOptions, it will fail.

Thank you once again for spotting this. We will throw an explicit exception in this case.

@ashishp-dev
Copy link
Author

Still app is crashing, I identify the what is the main crash issue. When i write something like this that i am facing the crash

transportParams: {
      'remainPresentFor':'5000',
      'heartbeatInterval': '5000'
    },

without transportParams param my app is not crashing it is working fine. But my issue is we need this parameters as on our Backend system this is depending to go further. So i am not allowing to remove this transportParams . So can you please look into this at high priority.
This crash issue is happen on some of the iPhone devices, like 7 plus with iOS running 15.x.x , second is iPhone 12 with iOS 16.5 running (almost latest OS) so we are struck for our release due to this. I urge you to check ASAP and give proper solution to come-out from this situation

@ttypic
Copy link
Contributor

ttypic commented Jun 20, 2024

@ashishp-dev, we’ve found a potential problem related to the transportParams configuration and are working on it as a top priority. We'll keep you updated on our progress and aim to have a fix soon.

@ttypic
Copy link
Contributor

ttypic commented Jun 21, 2024

@ashishp-dev We've published a new version (1.2.33) that should solve the issue. If the issue still exists, please feel free to reopen the ticket

@ashishp-dev
Copy link
Author

Hey @ttypic

My crash problem is fixed now, this will help to lots of IOS crash
If i will face any issues then i will contact to you

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working. It's clear that this does need to be fixed.
Development

Successfully merging a pull request may close this issue.

3 participants