JetBrains/azure-tools-for-intellij

Publishing function app fails with 401 Unauthorized error

andymetcalfe93 opened this issue · 2 comments

Hi,

I have been using this plugin for a long time to publish Function Apps without problem. However today when I've tried to publish one of my apps, it fails with the error "Fail publishing ZIP file: java.lang.RuntimeException: Fail publishing ZIP file. Response code: 401. Response message: Unauthorized."

I can still successfully publish a different app.

I have tried deploying using az functionapp deploy, with the zip that Rider generated, however that fails with the message "This API isn't available in this environment yet!" and I can't figure out how to solve that.

I attempted to try the version 4 preview as suggested in a different issue however, even after adding the preview list url, I can't see the update so maybe my version of Rider (2023.1.1 Build #RD-231.8770.54) isn't supported?

My idea.log doesn't show any helpful information that I can see:
2024-07-17 11:49:50,716 [2650352] WARN - #c.j.r.RiderApplicationLoadListener - [STDERR] java.lang.RuntimeException: Fail publishing ZIP file 2024-07-17 11:49:50,717 [2650353] WARN - #c.j.r.RiderApplicationLoadListener - [STDERR] at com.microsoft.intellij.runner.functionapp.config.runstate.FunctionAppDeployStateUtil.packAndDeploy(FunctionAppDeployStateUtil.kt:203) 2024-07-17 11:49:50,717 [2650353] WARN - #c.j.r.RiderApplicationLoadListener - [STDERR] at com.microsoft.intellij.runner.functionapp.config.runstate.FunctionAppDeployStateUtil.deployToAzureFunctionApp(FunctionAppDeployStateUtil.kt:169) 2024-07-17 11:49:50,717 [2650353] WARN - #c.j.r.RiderApplicationLoadListener - [STDERR] at com.microsoft.intellij.runner.functionapp.config.FunctionAppRunState.executeSteps(FunctionAppRunState.kt:89) 2024-07-17 11:49:50,717 [2650353] WARN - #c.j.r.RiderApplicationLoadListener - [STDERR] at com.microsoft.intellij.runner.functionapp.config.FunctionAppRunState.executeSteps(FunctionAppRunState.kt:63) 2024-07-17 11:49:50,717 [2650353] WARN - #c.j.r.RiderApplicationLoadListener - [STDERR] at com.microsoft.azure.toolkit.intellij.common.AzureRunProfileState.lambda$execute$0(AzureRunProfileState.java:60) 2024-07-17 11:49:50,717 [2650353] WARN - #c.j.r.RiderApplicationLoadListener - [STDERR] at rx.internal.operators.OnSubscribeFromCallable.call(OnSubscribeFromCallable.java:48) 2024-07-17 11:49:50,717 [2650353] WARN - #c.j.r.RiderApplicationLoadListener - [STDERR] at rx.internal.operators.OnSubscribeFromCallable.call(OnSubscribeFromCallable.java:33) 2024-07-17 11:49:50,717 [2650353] WARN - #c.j.r.RiderApplicationLoadListener - [STDERR] at com.microsoft.azure.toolkit.lib.common.task.AzureRxTaskManager.lambda$null$0(AzureRxTaskManager.java:30) 2024-07-17 11:49:50,717 [2650353] WARN - #c.j.r.RiderApplicationLoadListener - [STDERR] at com.microsoft.azure.toolkit.lib.common.task.AzureTaskContext.run(AzureTaskContext.java:78) 2024-07-17 11:49:50,717 [2650353] WARN - #c.j.r.RiderApplicationLoadListener - [STDERR] at com.microsoft.azure.toolkit.lib.common.task.AzureRxTaskManager.lambda$null$1(AzureRxTaskManager.java:30) 2024-07-17 11:49:50,717 [2650353] WARN - #c.j.r.RiderApplicationLoadListener - [STDERR] at rx.Observable.unsafeSubscribe(Observable.java:10327) 2024-07-17 11:49:50,717 [2650353] WARN - #c.j.r.RiderApplicationLoadListener - [STDERR] at rx.internal.operators.OperatorSubscribeOn$SubscribeOnSubscriber.call(OperatorSubscribeOn.java:100) 2024-07-17 11:49:50,717 [2650353] WARN - #c.j.r.RiderApplicationLoadListener - [STDERR] at rx.internal.schedulers.CachedThreadScheduler$EventLoopWorker$1.call(CachedThreadScheduler.java:230) 2024-07-17 11:49:50,717 [2650353] WARN - #c.j.r.RiderApplicationLoadListener - [STDERR] at rx.internal.schedulers.ScheduledAction.run(ScheduledAction.java:55) 2024-07-17 11:49:50,717 [2650353] WARN - #c.j.r.RiderApplicationLoadListener - [STDERR] at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:539) 2024-07-17 11:49:50,717 [2650353] WARN - #c.j.r.RiderApplicationLoadListener - [STDERR] at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) 2024-07-17 11:49:50,717 [2650353] WARN - #c.j.r.RiderApplicationLoadListener - [STDERR] at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:304) 2024-07-17 11:49:50,717 [2650353] WARN - #c.j.r.RiderApplicationLoadListener - [STDERR] at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) 2024-07-17 11:49:50,717 [2650353] WARN - #c.j.r.RiderApplicationLoadListener - [STDERR] at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) 2024-07-17 11:49:50,717 [2650353] WARN - #c.j.r.RiderApplicationLoadListener - [STDERR] at java.base/java.lang.Thread.run(Thread.java:833) 2024-07-17 11:49:50,717 [2650353] WARN - #c.j.r.RiderApplicationLoadListener - [STDERR] Caused by: java.lang.RuntimeException: Fail publishing ZIP file. Response code: 401. Response message: Unauthorized. 2024-07-17 11:49:50,717 [2650353] WARN - #c.j.r.RiderApplicationLoadListener - [STDERR] at com.microsoft.intellij.helpers.deploy.KuduClient.kuduZipDeploy(KuduClient.kt:119) 2024-07-17 11:49:50,717 [2650353] WARN - #c.j.r.RiderApplicationLoadListener - [STDERR] at com.microsoft.intellij.helpers.deploy.KuduClient.kuduZipDeploy(KuduClient.kt:72) 2024-07-17 11:49:50,717 [2650353] WARN - #c.j.r.RiderApplicationLoadListener - [STDERR] at com.microsoft.intellij.runner.functionapp.config.runstate.FunctionAppDeployStateUtil.packAndDeploy(FunctionAppDeployStateUtil.kt:193) 2024-07-17 11:49:50,717 [2650353] WARN - #c.j.r.RiderApplicationLoadListener - [STDERR] ... 19 more

Hello! The authorization issue is what we decided to develop a new version because of. I can only suggest login/logout a few times. Unfortunately, the reworked authorization mechanism is only in the v4 preview plugin. The v4 preview version is supported since Rider 2023.3.

Thanks for the reply. It sounds like this new version is the way to go, I'll see if we can get our Rider licenses renewed so that we can update. Cheers