omniphx / forrest

A Laravel library for Salesforce
https://omniphx.github.io/forrest/
MIT License
259 stars 120 forks source link

No token available in V2.18.1 #342

Closed gromustapha closed 8 months ago

gromustapha commented 8 months ago

After upgrading to version 2.18.1 the error appears:

No token available {"userId":1,"exception":"[object] (Omniphx\\Forrest\\Exceptions\\MissingTokenException(code: 0): No token available at /vendor/omniphx/forrest/src/Omniphx/Forrest/Repositories/TokenRepository.php:55)
[stacktrace]
[stacktrace]
#0 /vendor/omniphx/forrest/src/Omniphx/Forrest/Repositories/TokenRepository.php(41): Omniphx\\Forrest\\Repositories\\TokenRepository->verify()
#1 vendor/omniphx/forrest/src/Omniphx/Forrest/Repositories/InstanceURLRepository.php(50): Omniphx\\Forrest\\Repositories\\TokenRepository->get()
#2 /vendor/omniphx/forrest/src/Omniphx/Forrest/Client.php(709): Omniphx\\Forrest\\Repositories\\InstanceURLRepository->get()
#3 /vendor/omniphx/forrest/src/Omniphx/Forrest/Authentications/OAuthJWT.php(26): Omniphx\\Forrest\\Client->getInstanceURL()
#4 /vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(261): Omniphx\\Forrest\\Authentications\\OAuthJWT->authenticate()
#5 app/Traits/SalesForce.php(50): Illuminate\\Support\\Facades\\Facade::__callStatic()
wch-karol commented 8 months ago

https://github.com/omniphx/forrest/pull/333#issuecomment-2009591501

omniphx commented 8 months ago

Hi @gromustapha, looking into this. Thought the change in #333 was backwards compatible but looks like that's not the case. Hope to have a fix out soon.

omniphx commented 8 months ago

Should be fixed now in v2.18.2. instanceURL is no longer required. Will default to loginURL which was the case previously.