exponent-server-sdk-php icon indicating copy to clipboard operation
exponent-server-sdk-php copied to clipboard

Default object from empty value

Open JamesKindyHub opened this issue 4 years ago • 1 comments

Getting this error in production

[2021-06-11 04:46:41] staging.ERROR: Creating default object from empty value {"userId":1,"exception":"[object] (ErrorException(code: 0): Creating default object from empty value at /var/app/current/vendor/alymosul/exponent-server-sdk-php/lib/Repositories/ExpoFileDriver.php:49) [stacktrace] #0 /var/app/current/vendor/alymosul/exponent-server-sdk-php/lib/Repositories/ExpoFileDriver.php(49): Illuminate\Foundation\Bootstrap\HandleExceptions->handleError(2, 'Creating defaul...', '/var/app/curren...', 49, Array) #1 /var/app/current/vendor/alymosul/exponent-server-sdk-php/lib/ExpoRegistrar.php(41): ExponentPhpSDK\Repositories\ExpoFileDriver->store('User_xxxxx', 'ExponentPushTok...') #2 /var/app/current/vendor/alymosul/exponent-server-sdk-php/lib/Expo.php(60): ExponentPhpSDK\ExpoRegistrar->registerInterest('User_xxxxx', 'ExponentPushTok...') #3 /var/app/current/app/Http/Controllers/PushNotifier.php(170): ExponentPhpSDK\Expo->subscribe('User_xxxxx', 'ExponentPushTok...')

What's causing this?

I saw a previous thread suggesting to delete a tokens.json file but I can't find one?

JamesKindyHub avatar Jun 11 '21 04:06 JamesKindyHub

I had the same problem. In my case the content of the tokens.json file was written 'null'. The file is located in '/vendor/alymosul/exponent-server-sdk-php/storage/tokens.json'.

CristianoGehring avatar Aug 20 '21 14:08 CristianoGehring