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

ConfigCatUser crash #51

Open
aplha98 opened this issue Dec 12, 2024 · 9 comments
Open

ConfigCatUser crash #51

aplha98 opened this issue Dec 12, 2024 · 9 comments
Labels
bug Something isn't working

Comments

@aplha98
Copy link

aplha98 commented Dec 12, 2024

this block of code is crashing on IOS

val user = ConfigCatUser(
      identifier = "[email protected]",
      email =  "[email protected]"
)
  
client.setDefaultUser(user)
                    

the crash is kotlin.native.internal.FileFailedToInitializeException: There was an error during

for some reasone also this line is crash
log.d(user.toString())

@aplha98 aplha98 added the bug Something isn't working label Dec 12, 2024
@novalisdenahi
Copy link
Contributor

novalisdenahi commented Dec 12, 2024

Hi @aplha98,

Thanks for the bug report!

Can you provide more information to help us investigate the problem?

  • The SDK version
  • IOS version
  • How is the client initialized?
  • A more detailed error message (if possible)

Thanks in advance,
Daniel

@aplha98
Copy link
Author

aplha98 commented Dec 12, 2024

The SDK version = 3.0.1
IOS version = 18.0
How is the client initialized?

   private val client: ConfigCatClient = ConfigCatClient(keysBaseOnPlatform.configCatKey) {
        pollingMode = manualPoll()
        requestTimeout = 10.seconds
        logLevel = if (environmentConfiguration.isProduction) LogLevel.OFF
        else LogLevel.INFO
    }

@novalisdenahi
Copy link
Contributor

Hi @aplha98,

Thanks for the details!

Can you provide us with the detailed error message you got?

Thanks in advance!

@alpha9982
Copy link

alpha9982 commented Dec 16, 2024

I am also having this issue, once you added these line ,
there is an exceptions on IOS only, or it will not fetch anything
the crash is kotlin.native.internal.FileFailedToInitializeException:

val user = ConfigCatUser(
      identifier = "[email protected]",
      email =  "[email protected]"
)
  
client.setDefaultUser(user)

@novalisdenahi
Copy link
Contributor

Hi @alpha9982,

Can you provide more information to help us investigate the problem?

  • The SDK version
  • IOS version
  • How is the client initialized?
  • A more detailed error message

@novalisdenahi
Copy link
Contributor

Hi @aplha98,

We could not reproduce the problem based on the information we received.

Can you provide us with the complete error stack trace?
Or can you provide us with a sample repo where the problem is presented? That would be the best option.

Thanks in advance!

@alpha9982
Copy link

MyApplication.zip

here is a smaple contains the bug on the ios but working on android ,
just change the api key plz

note: by removing these lines you will be able to fetch the flag without
the crash is kotlin.native.internal.FileFailedToInitializeException:

val user = ConfigCatUser(
      identifier = "[email protected]",
      email =  "[email protected]"
)
  
client.setDefaultUser(user)

@z4kn4fein
Copy link
Member

z4kn4fein commented Dec 19, 2024

Hi @aplha98 @alpha9982, thank you for the sample project, we were able to repro the issue. We are started working on the fix, and we'll let you know when it's released.

In the meantime, I'd recommend to set the logLevel option at the SDK initialization to either LogLevel.WARNING or LogLevel.ERROR as the issue is caused by logging the user object which the SDK does when the log level is set to INFO.

@huthe98
Copy link

huthe98 commented Dec 19, 2024

thank you very much!

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

5 participants