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

"Copy error message with stacktrace" to clipboard action doesn't work #49

Closed
plagov opened this issue Jan 2, 2025 · 9 comments
Closed
Assignees

Comments

@plagov
Copy link

plagov commented Jan 2, 2025

I add the latest available versions of both allure3 and plugin-awesome within my pipeline through the npm commands: npm add allure and npm add @allurereport/plugin-awesome.

When I open the failed test and I want to copy the error message with the stack-trace to the clipboard by clicking the respective "copy" icon (see attached screenshot), then it doesn't copy anything into the clipboard.

image

@todti todti self-assigned this Jan 6, 2025
@todti
Copy link
Collaborator

todti commented Jan 6, 2025

Hi, @plagov! Could you clarify whether the button copies the error message or if nothing at all is added to the clipboard? Logically, the stack trace shouldn't be included when the button is pressed, message only.

Also, could you please let me know your browser/OS and its version? It’s possible that the issue is related to the environment or operating system you’re using.

Thank you!

@plagov
Copy link
Author

plagov commented Jan 7, 2025

Hi @todti!
Sorry for not providing all the details about the issue. I'm on Windows 11. My main browser is MS Edge. Nothing gets copied into the clipboard on Edge. I have disabled all ad blockers and retried - same, nothing is copied over.

Also, I tried the same in Firefox. Also clean, no ad blockers, just default browser settings - it's fine, the error message is copied into the clipboard.


It might be useful as well.
I'm using Azure DevOps as a build server. I generate a report as a single HTML during my pipeline and publish this report using this Azure Pipeline task: JakubRumpca.azure-pipelines-html-report.PublishHtmlReport.PublishHtmlReport@1. So, all the above steps I did with Edge and Firefox are against the report published to the Azure Pipeline build.

@plagov
Copy link
Author

plagov commented Jan 7, 2025

And since we are on this "copy to clipboard" topic, this action also doesn't work on Edge and does on Firefox.

image

@epszaw
Copy link
Member

epszaw commented Jan 9, 2025

@todti does the fix handle issue with the fullName too?

@todti
Copy link
Collaborator

todti commented Jan 10, 2025

@epszaw yes, I've fixed it as well

@plagov you can try again now, it should be working. If you have any questions, feel free to reopen this issue.

@todti todti closed this as completed Jan 10, 2025
@plagov
Copy link
Author

plagov commented Jan 22, 2025

@todti does the fix work with Edge browser? Doesn't look it is fixed for Edge.
When I click on the icon, I see now the animation and a tooltip text changes to the "Successfully copied", but still nothing in the clipboard.

Same with the full name of the scenario.

P.S. I don't have permissions to reopen this issue.

@todti
Copy link
Collaborator

todti commented Jan 22, 2025

I'll test again. It's possible that browser Edge is blocking clipboard access. Do you have any errors in the browser console?

@plagov
Copy link
Author

plagov commented Jan 22, 2025

@todti sorry, I forgot to check the browser console for any errors. Indeed, there are issues with permissions. Here's what I get when click on the icon:

[Violation] Permissions policy violation: The Clipboard API has been blocked because of a permissions policy applied to the current document. See https://permanently-removed.invalid for more details.

Uncaught (in promise) NotAllowedError: Failed to execute 'writeText' on 'Clipboard': The Clipboard API has been blocked because of a permissions policy applied to the current document. See https://permanently-removed.invalid for more details.

@todti
Copy link
Collaborator

todti commented Jan 22, 2025

The issue is related to access permissions in Azure DevOps. Copying is not only restricted to report but also at the environment level. You need to adjust the permissions at the environment level to allow clipboard access.

A quick fix could be opening edge://flags in the address bar and searching clipboard-write.

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

3 participants