Closed mattials closed 6 months ago
Hello @mattials, Thank you for bringing this issue to our attention. We are taking a look to resolve it.
Hello @vazarkevych! Any news about this? Thank you!
Hi @vazarkevych! We detected this issue in version 1.0.47 when working on different iOS applications.
We have just updated the pod to version 1.0.52 and the problem is still there:
[2024-04-22 09:35:07.458] FeaturesViewModel.swift:48 ERROR: Failed load local data
[2024-04-22 09:35:07.459] FeaturesViewModel.swift:48 ERROR: Failed load local data
As a hint, if we deactivate the "Ciphered" option it seems to work:
Hello @alvarogoj,
Thank you for sending us the detailed information, it will help us reproduce the issue. Could you please tell us which toggles you used: Encrypt SDK payload, Hash secure attributes, Hide experiment/variation names? And when you encounter this issue, does it occur at the start of the app or at a different time? Any detail you provide may be important for us.
Hi @vazarkevych. We have all the toggles active: "Encrypt SDK payload", "Hash secure attributes" and "Hide experiment/variation names". We encounter this problem anytime, right after application launch or after some time. Thank you.
Thank you for the clarification @alvarogoj. I would like to ask about the clearCache function: have you used it, and which directory did you use to save it?
Hello @vazarkevych We are not using the clearCache function, we are migrating from version '1.0.42' to the latest available version '1.0.52', keeping the same configuration(changing to the new init) we get this error.
Old Init 1.0.42:
GrowthBookBuilder(
url: url,
encryptionKey: encryptionKey,
attributes: attributes
) { experiment, result in
} refreshHandler: { result in
}.initializer()
New init 1.0.52:
GrowthBookBuilder(
apiHost: apiHost,
clientKey: clientKey,
encryptionKey: encryptionKey,
attributes: attributes,
trackingCallback: { experiment, experimentResult in
}).initializer()
Hi @mattials, please try installing our latest release, version 53, and let me know what appears in the console. I'm interested to see if the error persists or if it has been resolved. Please share the output you receive.
Hi @vazarkevych now with the 1.0.53 throws this errors the first time after the update:
[2024-05-06 09:36:50.535] CachingManager.swift:64 ERROR: File doesn't exist [2024-05-06 09:36:50.536] FeaturesViewModel.swift:54 ERROR: Failed load data from local storage or data is empty [2024-05-06 09:36:50.536] CachingManager.swift:64 ERROR: File doesn't exist [2024-05-06 09:36:50.537] FeaturesViewModel.swift:54 ERROR: Failed load data from local storage or data is empty
Hi @mattials, thank you for your reply. We have uploaded the latest release, version 54, and would like to ask you to check the console again in this new release. It will really help us to fix the issue. Thanks in advance.
@vazarkevych thanks for the quick reply, still the same problem the first time after the update with the 'GrowthBook-IOS' pod version, '1.0.54':
[2024-05-07 11:59:01.730] CachingManager.swift:64 ERROR: File doesn't exist [2024-05-07 11:59:01.731] FeaturesViewModel.swift:54 ERROR: Failed load data from local storage or data is empty [2024-05-07 11:59:01.731] FeaturesViewModel.swift:81 ERROR: Failed get api URL [2024-05-07 11:59:01.731] CachingManager.swift:64 ERROR: File doesn't exist [2024-05-07 11:59:01.731] FeaturesViewModel.swift:54 ERROR: Failed load data from local storage or data is empty
Hi, @mattials and thank you for your quick reply as well. I wanted to ask if you see this message only when the app starts, or during the use of the app too, because it's important. Also, if you still have a problem with certain feature flags not returning correctly.
@vazarkevych the error is only displayed when the app starts, and yes when the error is logged it is not possible to access the features flags.
Hi, @mattials. It was unclear whether it happens on the first launch of the app after installation or every time the app is launched.
hi @vazarkevych It happens on the first launch of the app after installation.
Hi, @mattials, the logic is that if the cache is empty, we will make a request and receive features from the backend. Maybe the problem is in the Internet connection when you can't access the feature flags. And when exactly do you try to get features?
Hello, @vazarkevych the App does have internet connection when it tries to access a feature flag, because in the screen where it tries to access that feature flag, in the presentation of that screen, there is a list that rescues from the backend, also before that list we do the login of the application.
In addition it works correctly in the version '1.0.42' but we want to update to not have to use Rosetta.
Hi, @mattials. We have tried different ways to reproduce this issue, but we still can't do it. Are you using a custom directory for the cache?
hi @vazarkevych we are using this init: https://github.com/growthbook/growthbook-swift/issues/50#issuecomment-2079131535
could you try to migrate from 1.0.42 to this latest version?
@mattials we will do that and I will keep you posted.
Hi, @mattials yesterday we attempted to reproduce this issue by migrating from version 1.0.42, but everything seems to be working fine. Could you please send us a screen recording demonstrating how you encounter the issue? Thank you.
hi @vazarkevych, I can give you a screenshot of the log, we reproduce the error when migrating from version 1.0.42 to last version, it always happens to us, I give you my enviroment too:
Xcode Version 15.3 (15E204a) MacOS 14.4.1 (23E224) Tested in iOS 17.2 and 17.4
Hi @mattials, thank you for providing the information. We will investigate it.
hi @vazarkevych any news?
Hi, @mattials. Can we maybe set up a call with you? It will be the best way to reproduce the issue because we still can't do that.
hi @vazarkevych ok, we can schedule a call, where can I contact you privately?
Hi, @mattials here is a link to choose a convenient meeting time for you: Choose a meeting time
The issue has been solved!!, thank you for your help.
After upgrading to the latest version 1.0.47, I have started to experience this error:
[2024-03-11 11:49:48.198] FeaturesViewModel.swift:47 ERROR: Failed load local data
This has caused that when returning certain values of features flags these values are not returned correctly.