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

Decoding error with German "Umlauts" when using the Useragen option #759

Closed
scysys opened this issue Jun 20, 2022 · 9 comments
Closed

Decoding error with German "Umlauts" when using the Useragen option #759

scysys opened this issue Jun 20, 2022 · 9 comments
Assignees
Labels
1 backlog bug Something isn't working

Comments

@scysys
Copy link

scysys commented Jun 20, 2022

To Reproduce (i.e. user steps, not code)

Steps to reproduce the behavior:

Error messages

E/flutter (28734): [ERROR:flutter/lib/ui/ui_dart_state.cc(198)] Unhandled Exception: FormatException: Invalid HTTP header field value: "Hitradio Lüneburg." (at character 11)
E/flutter (28734): Hitradio Lüneburg.
E/flutter (28734):           ^
E/flutter (28734): 
E/flutter (28734): #0      _HttpHeaders._validateValue (dart:_http/http_headers.dart:664:9)
E/flutter (28734): #1      _HttpHeaders._addAll (dart:_http/http_headers.dart:71:20)
E/flutter (28734): #2      _HttpHeaders.set (dart:_http/http_headers.dart:92:5)
E/flutter (28734): #3      _proxyHandlerForUri.handler.<anonymous closure> (package:just_audio/just_audio.dart:3096:34)
E/flutter (28734): #4      _HttpHeaders.forEach.<anonymous closure> (dart:_http/http_headers.dart:122:13)
E/flutter (28734): #5      _HashMap.forEach (dart:collection-patch/collection_patch.dart:164:15)
E/flutter (28734): #6      _HttpHeaders.forEach (dart:_http/http_headers.dart:120:14)
E/flutter (28734): #7      _proxyHandlerForUri.handler (package:just_audio/just_audio.dart:3095:30)
E/flutter (28734): <asynchronous suspension>

Flutter SDK version

Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 3.0.2, on macOS 12.4 21F79 darwin-x64, locale de-DE)
Checking Android licenses is taking an unexpectedly long time...[✓] Android toolchain - develop for Android devices (Android SDK version 32.1.0-rc1)
[✓] Xcode - develop for iOS and macOS (Xcode 13.4.1)
[✓] Chrome - develop for the web
[✓] Android Studio (version 2021.2)
[✓] VS Code (version 1.68.0)
[✓] Connected device (3 available)
[✓] HTTP Host Availability

• No issues found!

Additional context

Ill just added an other url

http://stream.laut.fm/hitradio1

and your default useragent

myradioapp/1.0 (Linux;Android 11) https://myradioapp.com

from your documentation.


I tried a little bit to decode it, but wont find a real solution to it. Ideas?
This behavior only is happening when adding a usergent.

@scysys scysys added 1 backlog bug Something isn't working labels Jun 20, 2022
@github-actions
Copy link

Oops, it appears that your issue did not follow the template and is missing one or more required sections. Please open a new issue, and provide all required sections and information.

FAQ:

  1. Do I really need to submit a minimal reproduction project for a bug? A: Yes. I prioritise bugs secondarily on how many people are affected, and primarily on whether the bug report is complete, in the sense that it enables me to immediately reproduce it and start working on a fix. If a bug is important to you, the best thing you can do is to provide all requested information ASAP so that I can start looking into it ASAP.

  2. I think I supplied all required information, so did the bot make a mistake? A: The bot only checks the section headings, so when you post a new issue, make sure you leave the section headings intact. (Note that because of this, it is even possible to trick the bot by including only the section headings, and then not providing the requested information under each heading. This is frowned upon, and the issue will be closed manually.)

@scysys
Copy link
Author

scysys commented Jun 20, 2022

really? haha. other informations not needed. @ryanheise

@ryanheise
Copy link
Owner

Sure, maybe if you were running the project you would like to accept such bug reports. But of course if you want me to help you, you will follow my instructions and provide all information I have requested. It's your choice, maybe you don't want it fixed that bad?

@scysys
Copy link
Author

scysys commented Jun 23, 2022

Sure, maybe if you were running the project you would like to accept such bug reports. But of course if you want me to help you, you will follow my instructions and provide all information I have requested. It's your choice, maybe you don't want it fixed that bad?

Wow! What is that for an stupid answer Ryan? The other informations just makes no sense what browser or whatever you use. Sure I though about it to also add it to report. But it makes no sense. So I thought its better for YOU to leave them that you only have things what you really need to reproduce. Sorry for opened a report. Was my last one.

@ryanheise
Copy link
Owner

My physical limitations mean I can't easily work on computers but I do my best. When people follow the instructions and template exactly, that makes it actually possible for me to do the work I do within my limitations. If you don't care about any of that and you want me to do things your way, then yes you may leave, I should not have to argue and justify myself. I regrettably can't help you, but hopefully someone else will report the bug in the correct way at which point I will be able to take action. Goodbye and good luck.

@waplay
Copy link

waplay commented Jun 25, 2022

I confirm, I have the same problem. Stations using special characters in their headers throw an unhandled exception. It would be nice if this behavior could be fixed. Or let us catch this exception, for example, to give the player a second attempt to connect without a user agent.

By the way, this behavior causes not only player = AudioPlayer(userAgent: userAgent), but also any header in player.setAudioSource(AudioSource.uri())

To reproduce the problem, it is enough to substitute these urls in the standard example of the library.

http://radio.uanyot.com:8000/radio.ogg
https://listen.radioking.com/radio/2725/stream/72647
https://listen1.myradio24.com/6262

@ryanheise
Copy link
Owner

@waplay would you mind submitting a bug report so that I can investigate it? As I have explained above, I need this to proceed, so if you can submit one then I'll be able to investigate.

@waplay
Copy link

waplay commented Jun 25, 2022

@ryanheise I submit a new bug report #765

@github-actions
Copy link

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs, or use StackOverflow if you need help with just_audio.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 10, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
1 backlog bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants