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

issues with team notifications #3626

Open
2 tasks done
khaledgithubwl opened this issue Apr 17, 2024 · 10 comments
Open
2 tasks done

issues with team notifications #3626

khaledgithubwl opened this issue Apr 17, 2024 · 10 comments
Assignees
Labels
defect Something isn't working help wanted Extra attention is needed p2 Non-critical bugs, and features that help organizations to identify and reduce risk

Comments

@khaledgithubwl
Copy link

Current Behavior

when I use "Select team as recipient" for notification I get this error:
ERROR [alpine.event.framework.LoggableUncaughtExceptionHandler] An unknown error occurred in an asynchronous event or notification thread
java.lang.ClassCastException: class javax.json.JsonValueImpl cannot be cast to class javax.json.JsonString (javax.json.JsonValueImpl and javax.json.JsonString are in unnamed module of loader

Steps to Reproduce

1.use Select team as recipient

Expected Behavior

receiving notification

Dependency-Track Version

4.10.1

Dependency-Track Distribution

Executable WAR

Database Server

PostgreSQL

Database Server Version

No response

Browser

Google Chrome

Checklist

@khaledgithubwl khaledgithubwl added defect Something isn't working in triage labels Apr 17, 2024
@nscuro
Copy link
Member

nscuro commented Apr 17, 2024

@khaledgithubwl Can you share the complete stack trace please?

@nscuro nscuro added the integration/msteams Related to the Microsoft Teams integration label Apr 17, 2024
@khaledgithubwl
Copy link
Author

@nscuro
ERROR [alpine.event.framework.LoggableUncaughtExceptionHandler] An unknown error occurred in an asynchronous event or notification thread
java.lang.ClassCastException: class javax.json.JsonValueImpl cannot be cast to class javax.json.JsonString (javax.json.JsonValueImpl and javax.json.JsonString are in unnamed module of loader org.eclipse.jetty.webapp.WebAppClassLoader @1fa268de)
at org.glassfish.json.JsonObjectBuilderImpl$JsonObjectImpl.getJsonString(JsonObjectBuilderImpl.java:252)
at org.dependencytrack.notification.publisher.SendMailPublisher.lambda$parseDestination$1(SendMailPublisher.java:178)
at java.base/java.util.stream.ReferencePipeline$7$1.accept(ReferencePipeline.java:273)
at java.base/java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1625)
at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:509)
at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:499)
at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:575)
at java.base/java.util.stream.AbstractPipeline.evaluateToArrayNode(AbstractPipeline.java:260)
at java.base/java.util.stream.ReferencePipeline.toArray(ReferencePipeline.java:616)
at org.dependencytrack.notification.publisher.SendMailPublisher.parseDestination(SendMailPublisher.java:191)
at org.dependencytrack.notification.publisher.SendMailPublisher.inform(SendMailPublisher.java:73)
at org.dependencytrack.notification.NotificationRouter.inform(NotificationRouter.java:91)
at alpine.notification.NotificationService.lambda$alertSubscriber$0(NotificationService.java:117)
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.lang.Thread.run(Thread.java:833)

@khaledgithubwl
Copy link
Author

hello @nscuro any news on this issue ?

@nscuro
Copy link
Member

nscuro commented Apr 29, 2024

@khaledgithubwl Does the offending alert rule have a destination specified?
image

@nscuro nscuro removed the integration/msteams Related to the Microsoft Teams integration label Apr 29, 2024
@nscuro
Copy link
Member

nscuro commented Apr 29, 2024

For reference, every alert rule has a publisherConfig JSON object where the Destination is stored. The Destination can be empty, null, or not exist at all. The error you're experiencing would not happen in those cases.

However, if the destination field of the JSON object is a number, the error would be triggered. Through configuration via UI, destination should never end up being a number, since the UI will always treat is as string.

Was this particular rule created through automation? Perhaps the destination was set to a number by accident? Maybe the " for denoting a string are missing?

Untitled

@nscuro
Copy link
Member

nscuro commented May 15, 2024

@khaledgithubwl Kind ping to please provide more information.

@nscuro nscuro self-assigned this May 15, 2024
@nscuro nscuro removed the in triage label May 15, 2024
@khaledgithubwl
Copy link
Author

khaledgithubwl commented May 16, 2024

hello @nscuro sorry for the late response, the destination field is empty only the team recipient is filled.
in the publisherConfig i have this publisherConfig: "{"destination":""}"
the team selected appears only under teams: .. name:

Thank you for your help :)

@khaledgithubwl
Copy link
Author

hello @nscuro any news on this ?
best regards,

@nscuro
Copy link
Member

nscuro commented May 24, 2024

The configuration you showed matches what I tried during my initial attempts to reproduce the issue. I haven't tried reproducing it since. Is it still occurring with v4.11.1?

@nscuro nscuro added help wanted Extra attention is needed p2 Non-critical bugs, and features that help organizations to identify and reduce risk and removed pending more information labels May 24, 2024
@khaledgithubwl
Copy link
Author

khaledgithubwl commented May 27, 2024

hello @nscuro I did not do the upgrade yet .. do you think the issue will be solved in this newer version ?
Best Regards,

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
defect Something isn't working help wanted Extra attention is needed p2 Non-critical bugs, and features that help organizations to identify and reduce risk
Projects
None yet
Development

No branches or pull requests

2 participants