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

java.io.IOException: Attempted read from closed stream. MS changed the Teams response #72

Closed
Eric-Maddox opened this issue Jan 25, 2023 · 3 comments

Comments

@Eric-Maddox
Copy link
Contributor

I found the issue in logsteamcity-server.log on the build server.
java.io.IOException: Attempted read from closed stream.
at msteamsnotifications.MsTeamsNotificationImpl.postViaWebHook(MsTeamsNotificationImpl.java:184)

Microsoft made a change that broke things for many people.
The change in the Webhook is documented here: MicrosoftDocs/msteams-docs#7830

@Eric-Maddox
Copy link
Contributor Author

The closed stream error happens because we get a 400 from the server and then try to read the results back twice, once as an error message and again as content. The stream can only be read once.

@Eric-Maddox
Copy link
Contributor Author

MsTeamsNotification failed : returned error Bad payload received by generic incoming webhook.

The 400 error is because the notification is sending JSON, but sending the content type header application/x-www-form-urlencoded

@spyder007
Copy link
Owner

Should be fixed by #73 , thanks @Eric-Maddox !

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