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

Azure-identity 1.13.1 breaks old pdf generator #64

Closed
acn-sbuad opened this issue Jul 30, 2024 · 2 comments
Closed

Azure-identity 1.13.1 breaks old pdf generator #64

acn-sbuad opened this issue Jul 30, 2024 · 2 comments
Labels
kind/bug Something isn't working

Comments

@acn-sbuad
Copy link
Contributor

acn-sbuad commented Jul 30, 2024

Description of the bug

Note: this bug affects the pdf generator code hosted in altinn/altinn-studio
From log

10:23:39.833 [ForkJoinPool.commonPool-worker-1] WARN com.microsoft.aad.msal4j.ConfidentialClientApplication -- [Correlation ID: 5cd523dc-f489-40c6-a9da-8d483ba80481] Execution of class com.microsoft.aad.msal4j.AcquireTokenSilentSupplier failed: Token not found in the cache
10:23:39.998 [main] ERROR com.azure.core.implementation.AccessTokenCache -- {"az.sdk.message":"Failed to acquire a new access token.","exception":"'void com.azure.core.credential.AccessToken.<init>(java.lang.String, java.time.OffsetDateTime, java.time.OffsetDateTime)'"}
Exception in thread "main" java.lang.reflect.InvocationTargetException
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
        at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.base/java.lang.reflect.Method.invoke(Method.java:568)
        at org.springframework.boot.loader.launch.Launcher.launch(Launcher.java:91)
        at org.springframework.boot.loader.launch.Launcher.launch(Launcher.java:53)
        at org.springframework.boot.loader.launch.JarLauncher.main(JarLauncher.java:58)
Caused by: java.lang.NoSuchMethodError: 'void com.azure.core.credential.AccessToken.<init>(java.lang.String, java.time.OffsetDateTime, java.time.OffsetDateTime)'
        at com.azure.identity.implementation.MsalToken.<init>(MsalToken.java:27)
        at com.azure.identity.implementation.IdentitySyncClient.authenticateWithConfidentialClient(IdentitySyncClient.java:146)
        at com.azure.identity.ClientSecretCredential.getTokenSync(ClientSecretCredential.java:136)
        at com.azure.core.implementation.AccessTokenCache.lambda$new$2(AccessTokenCache.java:63)
        at com.azure.core.implementation.AccessTokenCache.lambda$retrieveTokenSync$11(AccessTokenCache.java:228)
        at com.azure.core.implementation.AccessTokenCache.getTokenSync(AccessTokenCache.java:91)
        at com.azure.core.http.policy.BearerTokenAuthenticationPolicy.setAuthorizationHeaderHelperSync(BearerTokenAuthenticationPolicy.java:194)
        at com.azure.core.http.policy.BearerTokenAuthenticationPolicy.setAuthorizationHeaderSync(BearerTokenAuthenticationPolicy.java:181)
        at com.azure.security.keyvault.secrets.implementation.KeyVaultCredentialPolicy.authorizeRequestOnChallengeSync(KeyVaultCredentialPolicy.java:314)
        at com.azure.core.http.policy.BearerTokenAuthenticationPolicy.processSync(BearerTokenAuthenticationPolicy.java:152)
        at com.azure.core.http.HttpPipelineNextSyncPolicy.processSync(HttpPipelineNextSyncPolicy.java:53)
        at com.azure.core.http.policy.RetryPolicy.attemptSync(RetryPolicy.java:211)
        at com.azure.core.http.policy.RetryPolicy.processSync(RetryPolicy.java:161)
        at com.azure.core.http.HttpPipelineNextSyncPolicy.processSync(HttpPipelineNextSyncPolicy.java:53)
        at com.azure.core.http.policy.AddHeadersPolicy.processSync(AddHeadersPolicy.java:66)
        at com.azure.core.http.HttpPipelineNextSyncPolicy.processSync(HttpPipelineNextSyncPolicy.java:53)
        at com.azure.core.http.policy.HttpPipelineSyncPolicy.processSync(HttpPipelineSyncPolicy.java:51)
        at com.azure.core.http.policy.UserAgentPolicy.processSync(UserAgentPolicy.java:174)
        at com.azure.core.http.HttpPipelineNextSyncPolicy.processSync(HttpPipelineNextSyncPolicy.java:53)
        at com.azure.core.http.HttpPipeline.sendSync(HttpPipeline.java:138)
        at com.azure.core.implementation.http.rest.SyncRestProxy.send(SyncRestProxy.java:62)
        at com.azure.core.implementation.http.rest.SyncRestProxy.invoke(SyncRestProxy.java:83)
        at com.azure.core.implementation.http.rest.RestProxyBase.invoke(RestProxyBase.java:124)
        at com.azure.core.http.rest.RestProxy.invoke(RestProxy.java:95)
        at jdk.proxy2/jdk.proxy2.$Proxy5.getSecretSync(Unknown Source)
        at com.azure.security.keyvault.secrets.implementation.SecretClientImpl.getSecretWithResponse(SecretClientImpl.java:1133)
        at com.azure.security.keyvault.secrets.SecretClient.lambda$getSecretWithResponse$1(SecretClient.java:360)
        at com.azure.security.keyvault.secrets.SecretClient.callWithMappedException(SecretClient.java:1025)
        at com.azure.security.keyvault.secrets.SecretClient.getSecretWithResponse(SecretClient.java:359)
        at com.azure.security.keyvault.secrets.SecretClient.getSecret(SecretClient.java:296)
        at altinn.platform.pdf.App.connectToKeyVaultAndSetApplicationInsight(App.java:67)
        at altinn.platform.pdf.App.main(App.java:35)

Steps To Reproduce

Patch dependency follow pod status. Restarts regularily when pod is in use.

Additional Information

Change log:
https://github.com/Azure/azure-sdk-for-java/blob/azure-identity_1.13.2/sdk/identity/azure-identity/CHANGELOG.md

@SandGrainOne
Copy link
Member

Trying to bump again skipping the failing version.

@SandGrainOne
Copy link
Member

Looks like the new version is running. New pods have started without any errors in the logs. Can also find the following log entry:
08:41:41.616 [main] INFO com.azure.core.implementation.AccessTokenCache -- {"az.sdk.message":"Acquired a new access token."}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants