Hi Team,
We’ve encountered an issue with the getShipmentById() function, resulting in a "403: authorization token not found" error after a few hours of deployment. It seems that the token is expiring unexpectedly, causing the call to fail. This problem has recently surfaced and was not present before.
Steps to Reproduce:
- Deploy your extension.
- Initially, methods utilizing getShipmentById function operate as expected.
- However, after approximately one hour, attempting to run the same methods results in the aforementioned error.
Please help here.
@Jalees_Jahanzaib please share the env and extension name.
@Krishnam_Mishra
env is Jiox1
and extension is ROMS ext/ Unicommerce ext
Extension is not working.Please check the below logs
Caused by: org.springframework.beans.BeanInstantiationException: Failed to instantiate [com.fynd.extension.model.Extension]: Factory method 'getExtension' threw exception with message: Error in Webhook Event Details due to Missing / Invalid Data
at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:171)
at org.springframework.beans.factory.support.ConstructorResolver.instantiate(ConstructorResolver.java:655)
... 130 common frames omitted
Caused by: com.fynd.extension.error.FdkInvalidWebhookConfig: Error in Webhook Event Details due to Missing / Invalid Data
at com.fynd.extension.service.WebhookService.getEventConfig(WebhookService.java:315)
at com.fynd.extension.service.WebhookService.initialize(WebhookService.java:153)
at com.fynd.extension.model.Extension.initialize(Extension.java:124)
at com.fynd.roms.ROMSApplication.getExtension(ROMSApplication.java:98)
at com.fynd.roms.ROMSApplication$$SpringCGLIB$$0.CGLIB$getExtension$0(<generated>)
at com.fynd.roms.ROMSApplication$$SpringCGLIB$$2.invoke(<generated>)
at org.springframework.cglib.proxy.MethodProxy.invokeSuper(MethodProxy.java:258)
at org.springframework.context.annotation.ConfigurationClassEnhancer$BeanMethodInterceptor.intercept(ConfigurationClassEnhancer.java:331)
at com.fynd.roms.ROMSApplication$$SpringCGLIB$$0.getExtension(<generated>)
at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104)
at java.base/java.lang.reflect.Method.invoke(Method.java:577)
at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:139)
... 131 common frames omitted
{2024-04-15 08:04:01.782 - WARN} {} {s.c.a.AnnotationConfigApplicationContext} Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'org.springframework.boot.autoconfigure.web.servlet.WebMvcAutoConfiguration$EnableWebMvcConfiguration': Unsatisfied dependency expressed through method 'setConfigurers' parameter 0: Error creating bean with name 'baseMvcConfigurer': Unsatisfied dependency expressed through field 'controllerInterceptor': Error creating bean with name 'controllerInterceptor': Unsatisfied dependency expressed through field 'extension': Error creating bean with name 'getExtension' defined in com.fynd.roms.ROMSApplication: Failed to instantiate [com.fynd.extension.model.Extension]: Factory method 'getExtension' threw exception with message: Error in Webhook Event Details due to Missing / Invalid Data
{2024-04-15 08:04:01.785 - WARN} {} {ConfigServletWebServerApplicationContext} Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'romsController' defined in URL [jar:file:/app/roms-ext/roms-ext.jar!/BOOT-INF/classes!/com/fynd/roms/controller/RomsController.class]: Unsatisfied dependency expressed through constructor parameter 0: Error creating bean with name 'ROMService' defined in URL [jar:file:/app/roms-ext/roms-ext.jar!/BOOT-INF/classes!/com/fynd/roms/service/ROMService.class]: Unsatisfied dependency expressed through constructor parameter 0: Error creating bean with name 'com.fynd.roms.client.ROMSJsonClient': FactoryBean threw exception on object creation
{2024-04-15 08:04:01.786 - INFO} {} {com.fynd.roms.common.RedisService } Closing the jedis pool connection
{2024-04-15 08:04:01.786 - INFO} {} {j.LocalContainerEntityManagerFactoryBean} Closing JPA EntityManagerFactory for persistence unit 'default'
{2024-04-15 08:04:01.789 - INFO} {} {com.zaxxer.hikari.HikariDataSource } HikariPool-1 - Shutdown initiated...
{2024-04-15 08:04:01.795 - INFO} {} {com.zaxxer.hikari.HikariDataSource } HikariPool-1 - Shutdown completed.
{2024-04-15 08:04:01.796 - INFO} {} {o.apache.catalina.core.StandardService } Stopping service [Tomcat]
{2024-04-15 08:04:01.813 - INFO} {} {.s.b.a.l.ConditionEvaluationReportLogger}
@Krishnam_Mishra This is a new issue arising from platform(Plan expired) , impacting specifically webhooks and related processing, for which I have raised an issue with the team. Other services offered by the extension, specifically the fdk methods remain unaffected.
please check now. The issue is fixed now.
@Jalees_Jahanzaib the token expires within an hour
Token Response: {‘access_token’: ‘oa-846eb6ea3d979d2c0ccb89aa5d26621a95109be4’, ‘token_type’: ‘Bearer’, ‘expires_in’: 3599, ‘expires_at’: 1714981467.49, ‘scope’: [‘*’]}