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

"couldn't parse server version, regexp didn't match version" #339

Closed
lgrn opened this issue Jun 19, 2022 · 4 comments · Fixed by #417
Closed

"couldn't parse server version, regexp didn't match version" #339

lgrn opened this issue Jun 19, 2022 · 4 comments · Fixed by #417
Assignees
Labels
bug Something isn't working go Pull requests that update Go code hacktoberfest

Comments

@lgrn
Copy link

lgrn commented Jun 19, 2022

Describe the bug
Noisetorch is unable to parse the package version provided.

To Reproduce
Steps to reproduce the behavior:

  1. run noisetorch with pulseaudio 16
$ noisetorch -i -log
2022/06/19 11:01:11 Application starting. Version: 0.12.2 (archlinux)
2022/06/19 11:01:11 CAP_SYS_RESOURCE: true
2022/06/19 11:01:11 Checking if config needs to be initialized
2022/06/19 11:01:11 Couldn't resolve $XDG_CONFIG_HOME falling back to '/home/foo/.config'
2022/06/19 11:01:11 Wrote temp librnnoise to: /tmp/librnnoise-2953609971.so
2022/06/19 11:01:11 Couldn't resolve $XDG_CONFIG_HOME falling back to '/home/foo/.config'
2022/06/19 11:01:11 Audioserver package name: pulseaudio
2022/06/19 11:01:11 Audioserver package version: 16.0
2022/06/19 11:01:11 Detected PulseAudio
2022/06/19 11:01:11 couldn't parse server version, regexp didn't match version: 16.0
2022/06/19 11:01:11 Querying pulse rlimit
2022/06/19 11:01:11 Rlimit: {Cur:200000 Max:200000}. Trying to remove.
2022/06/19 11:01:11 Rlimit: {Cur:18446744073709551615 Max:18446744073709551615}
2022/06/19 11:01:11 Loading supressor for pulse
2022/06/19 11:01:11 Loaded null sink as idx: 35
2022/06/19 11:01:11 Loaded ladspa sink as idx: 36
2022/06/19 11:01:11 Loaded loopback as idx: 37
2022/06/19 11:01:11 Loaded remap source as idx: 38
2022/06/19 11:01:11 Deleted temp librnnoise: /tmp/librnnoise-2953609971.so

Expected behavior
Presumably it should be parsed. It looks like maybe it's hardcoded to expect a version number like 1.2.3 which causes issues with versions like 16.0.

I haven't looked much at the code but if the purpose of this is to check that the pipewire version isn't too old, maybe it should be rewritten to not print anything if pipewire isn't being used.

It looks like the error is generated on this line:

log.Printf("couldn't parse server version, regexp didn't match version: %s\n", versionString)

	res := versionRegex.FindStringSubmatch(versionString)
	if len(res) != 4 {
		log.Printf("couldn't parse server version, regexp didn't match version: %s\n", versionString)
		return audioserverinfo{servertype: servertype}, nil
	}

Desktop (please complete the following information):

  • Manjaro 21.2.6
  • Pulseaudio/Pipewire Version: pulseaudio 16.0-1
  • NoiseTorch Version [e.g. v0.12.0]: noisetorch 0.12.2-1

Additional context
Extra credit: noisetorch --version should return current version.

@lgrn lgrn added the bug Something isn't working label Jun 19, 2022
@TheDukeofErl TheDukeofErl added the go Pull requests that update Go code label Oct 21, 2022
@TheDukeofErl
Copy link
Collaborator

Yup, agree. This is a good candidate for revisiting after #359 is completed.

@rajkumarGosavi
Copy link
Contributor

Hi team,
Can I pick this up?

@AXDOOMER
Copy link
Collaborator

AXDOOMER commented Oct 2, 2023

Hi team, Can I pick this up?

Sure.

@AXDOOMER
Copy link
Collaborator

Fixed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working go Pull requests that update Go code hacktoberfest
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants