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

on(event:runInBackground:execute:) Never Executes #541

Open
vincentesm opened this issue May 29, 2024 · 6 comments
Open

on(event:runInBackground:execute:) Never Executes #541

vincentesm opened this issue May 29, 2024 · 6 comments

Comments

@vincentesm
Copy link

Hello,

I am facing an issue similar to the one described in SDK Ready Not Firing #512 where the on(event:runInBackground:execute:) method does not return with the .sdkReady event when the SDK is initialized.

I am noticing that the clientManager is nil in the DefaultSplitClient when the on(event:runInBackground:execute:) is called. DefaultSplitClient.swift Line 80.

On a brief look into the cause, the method does call back if I remove the weak reference from clientManager in the same file. DefaultSplitClient.swift Line 25. I realize this may not be the fix, but I hope that it is helpful in debugging.

Please let me know if I can provide any other details. Thank you.

Environment

  • iOS Version: iOS 17.2
  • Xcode Version: 15.3
  • Device Model: iPhone 15 Pro Simulator
  • Current SDK Version: 2.25.0
  • Latest SDK Version Without Issue: 2.24.4
@jsahoo
Copy link

jsahoo commented Jun 4, 2024

I'm having the exact same issue.

Environment

  • iOS Version: iOS 17.5
  • Xcode Version: 15.4
  • Device Model: iPhone 15 Pro Simulator
  • Current SDK Version: 2.25.0
  • Last Tested SDK Version Without Issue: 2.24.0 (haven't tried 2.24.4)

@javrudsky
Copy link
Contributor

javrudsky commented Jun 10, 2024

Hi @vincentesm and @jsahoo,
Thank you for the info.
Just to be sure, did you try version 2.24.7?
Also it would be good if you can provide you're integration code so that we can test that scenario.

@samshiffman321
Copy link

I am also experiencing this issue on the latest version 2.25.1

@gtsifrikas
Copy link

Any update on this?

@javrudsky
Copy link
Contributor

Hi,
I was able to reproduce this issue when there is only a local reference to the factory in the method where it is instantiated. If you’re encountering the same situation, you can work around the issue by maintaining a module reference.

@alexfu
Copy link

alexfu commented Sep 24, 2024

This particular comment hinted at a solution: #512 (comment)

So, the TL;DR is that if you don't have a strong reference to SplitFactory, that may be the reason why you are not getting events fired.

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

No branches or pull requests

6 participants