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

Invalid header field value for "X-Lantern-Device-Id" #1285

Merged
merged 26 commits into from
Jan 16, 2025

Conversation

atavism
Copy link
Contributor

@atavism atavism commented Jan 10, 2025

DEBUG flashlight.proxied: proxied.go:328 Chained request to http://api.getiantem.org/user-create failed [http_method=POST http_proto=HTTP/1.1 op=dualfetcher origin_port=80 parallel=false proxy_type=chained root_op=chainedandfronted]
ERROR flashlight.proxied: proxied.go:380 Chained failed, trying fronted: net/http: invalid header field value for "X-Lantern-Device-Id" [error=Chained failed, trying fronted: %v error_location=github.com/getlantern/flashlight/v7/proxied.(*dualFetcher).do (proxied.go:380) error_text=Chained failed, trying fronted: net/http: invalid header field value for "X-Lantern-Device-Id" error_type=errors.Error http_method=POST http_proto=HTTP/1.1 op=dualfetcher origin_port=80 parallel=false proxy_type=chained root_op=chainedandfronted]
ERROR flashlight.proxied: proxied.go:380   at github.com/getlantern/flashlight/v7/proxied.(*dualFetcher).do (proxied.go:380)
ERROR flashlight.proxied: proxied.go:380   at github.com/getlantern/flashlight/v7/proxied.(*dualFetcher).RoundTrip (proxied.go:237)
ERROR flashlight.proxied: proxied.go:380   at github.com/getlantern/flashlight/v7/proxied.(*chainedAndFronted).RoundTrip (proxied.go:185)
ERROR flashlight.proxied: proxied.go:380   at github.com/getlantern/flashlight/v7/proxied.ParallelForIdempotent.func1 (proxied.go:125)
ERROR flashlight.proxied: proxied.go:380   at github.com/getlantern/flashlight/v7/proxied.(*rt).RoundTrip (proxied.go:538)
ERROR flashlight.proxied: proxied.go:380   at net/http.send (client.go:259)
ERROR flashlight.proxied: proxied.go:380   at net/http.(*Client).send (client.go:180)
ERROR flashlight.proxied: proxied.go:380   at net/http.(*Client).do (client.go:724)
ERROR flashlight.proxied: proxied.go:380   at net/http.(*Client).Do (client.go:590)
  • Trims space around deviceID when setting it from lantern secrets in the home directory
  • Consolidate settings with app package
  • Update flashlight and some other dependencies

@@ -77,6 +77,7 @@ func NewClient(baseURL string, userConfig func() common.UserConfig) ProClient {
Timeout: 30 * time.Second,
}
} else {
//rt, _ := proxied.ChainedNonPersistent("")
httpClient = &http.Client{
Transport: proxied.ParallelForIdempotent(),
Copy link
Contributor Author

@atavism atavism Jan 10, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I did some testing, and these updates work well with both proxied.ChainedNonPersistent and proxied. ParallelForIdempotent

@atavism
Copy link
Contributor Author

atavism commented Jan 10, 2025

@jigar-f I guess we need to downgrade Go again to support Android, but for the time being could you please take a look? Thank you!

@atavism atavism requested a review from jigar-f January 10, 2025 01:45
@atavism atavism changed the title Chained failed: net/http: invalid header field value for "X-Lantern-Device-Id" Invalid header field value for "X-Lantern-Device-Id" Jan 10, 2025
@atavism atavism requested a review from reflog January 10, 2025 01:45
desktop/app/app.go Outdated Show resolved Hide resolved
desktop/app/app.go Outdated Show resolved Hide resolved
@jigar-f
Copy link
Contributor

jigar-f commented Jan 10, 2025

@atavism Just a couple of comments and just pushed changes for downgrade to go

@atavism
Copy link
Contributor Author

atavism commented Jan 16, 2025

@jigar-f thanks for the review!

@atavism atavism merged commit 8b5f555 into main Jan 16, 2025
1 check passed
@atavism atavism deleted the atavism/updates-device-id branch January 16, 2025 22:42
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

Successfully merging this pull request may close these issues.

2 participants