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

Queue Messages are not displaying #751

Open
jguadagno opened this issue Dec 24, 2023 · 6 comments
Open

Queue Messages are not displaying #751

jguadagno opened this issue Dec 24, 2023 · 6 comments

Comments

@jguadagno
Copy link

When using the Azure Plugin for Rider, I am not seeing an messages in the Queue for the local storage emulator.
Screenshot Azure Plugin

However, they are present in the Azure Storage Explorer
Screenshot Storage Explorer

I have not checked whether this is case for actual storage accounts.

@maartenba
Copy link

Just checked, can't reproduce the issue here. If you look at the storage emulator log (e.g. Azurite), do you see the queue being accessed when opening the node in Rider?

Should be a request similar to this (where foo is prepare-bulk-email on your end):

127.0.0.1 - - [04/Jan/2024:12:52:41 +0000] "GET /devstoreaccount1/foo/messages?numofmessages=32&peekonly=true HTTP/1.1" 200 -

@jguadagno
Copy link
Author

@maartenba I'll double check when I get back to that computer, but I am pretty sure the console messages from Azurite were displaying.

@jguadagno
Copy link
Author

@maartenba Yep, the debug output is there.
image

@maartenba
Copy link

Would you mind DMing me your IDE logs in Slack? (Help | Collect logs and Diagnostic data)
Ideally just after opening the queue

@maartenba
Copy link

Thanks for those logs! Looks like messages in your queue are not base64-encoded, and the storage library we are using doesnt support this at this time.

2024-01-05 15:42:10,491 [ 429566] SEVERE - #com.microsoft.intellij.util.PluginUtil - An error occurred while attempting to get queue messages.
(Message from Azure: "Error retrieving the Queue Message list")
com.microsoft.azuretools.azurecommons.helpers.AzureCmdException: Error retrieving the Queue Message list
	at com.microsoft.tooling.msservices.helpers.azure.sdk.StorageClientSDKManager.getQueueMessages(StorageClientSDKManager.java:513)
	at com.microsoft.intellij.helpers.storage.QueueFileEditor$13.run(QueueFileEditor.java:264)
	at com.intellij.openapi.progress.impl.CoreProgressManager.startTask(CoreProgressManager.java:434)
	at com.intellij.openapi.progress.impl.ProgressManagerImpl.startTask(ProgressManagerImpl.java:132)
	at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$runProcessWithProgressAsynchronously$5(CoreProgressManager.java:484)
	at com.intellij.codeWithMe.ClientId$Companion.decorateFunction$lambda$8(ClientId.kt:383)
	at com.intellij.codeWithMe.ClientId$Companion.decorateFunction$lambda$8(ClientId.kt:383)
	at com.intellij.openapi.progress.impl.ProgressRunner.lambda$submit$4(ProgressRunner.java:248)
	at com.intellij.openapi.progress.ProgressManager.lambda$runProcess$0(ProgressManager.java:73)
	at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$runProcess$1(CoreProgressManager.java:192)
	at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$executeProcessUnderProgress$12(CoreProgressManager.java:610)
	at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:685)
	at com.intellij.openapi.progress.impl.CoreProgressManager.computeUnderProgress(CoreProgressManager.java:641)
	at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:609)
	at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:78)
	at com.intellij.openapi.progress.impl.CoreProgressManager.runProcess(CoreProgressManager.java:179)
	at com.intellij.openapi.progress.ProgressManager.runProcess(ProgressManager.java:73)
	at com.intellij.openapi.progress.impl.ProgressRunner.lambda$submit$5(ProgressRunner.java:248)
	at com.intellij.openapi.progress.impl.ProgressRunner$ProgressRunnable.run(ProgressRunner.java:498)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
	at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:702)
	at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:699)
	at java.base/java.security.AccessController.doPrivileged(AccessController.java:399)
	at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1.run(Executors.java:699)
	at java.base/java.lang.Thread.run(Thread.java:840)
Caused by: java.lang.IllegalArgumentException: The String is not a valid Base64-encoded string.
	at com.microsoft.azure.storage.core.Base64.decode(Base64.java:88)
	at com.microsoft.azure.storage.queue.CloudQueueMessage.getMessageContentAsString(CloudQueueMessage.java:180)
	at com.microsoft.tooling.msservices.helpers.azure.sdk.StorageClientSDKManager.getQueueMessages(StorageClientSDKManager.java:492)
	... 25 more

Not sure how messages are added to your queue, but could you try with messageEncoding set to base64 if you're using Azure Functions?

https://learn.microsoft.com/en-us/azure/azure-functions/functions-bindings-storage-queue?tabs=isolated-process%2Cextensionv5%2Cextensionv3&pivots=programming-language-csharp#host-json

@jguadagno
Copy link
Author

That makes sense. All but one of the queues are being sent unencoded. Feel free to close as user error :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants