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

is slimerjs beta working with 302 redirect? #687

Open
andynuss opened this issue Mar 18, 2018 · 3 comments
Open

is slimerjs beta working with 302 redirect? #687

andynuss opened this issue Mar 18, 2018 · 3 comments

Comments

@andynuss
Copy link

versions

  • SlimerJS:
    beta for FF 57
  • Firefox:
    FF 57
  • Operating system:
    AWS Linux 2 os

Steps to reproduce the issue

I tried two things to get my webappliction to be exercised by slimer beta for FF 57.
First, I had a webapp with https absolute urls that pointed to a specific domain. This is how the documents were created. Then I had a second webapp that was identical except for the domain.
In slimer, when onResourceRequested encountered the document domain, I was doing a changeUrl
to the mirror domain, but with the rest of the url the same. This worked with FF 52 and the lastest
release of slimer for linux. But with the beta, all my changeUrls seemed to result in
"errcode: 99, desc: an unknown network-related error was detected (2152924148)." By the way,
some of the urls were cloudfront proxies of s3 buckets, and some were tomcat servlets, all using the
same domain via cloudfront url patterns.

To try to work around the problem, I redesigned my document urls to all be absolute urls to the same
domain. This allowed me to eliminate the need for changeUrl at all for the mirror domain, because I
made sure to exercise the document using the mirror domain's root url. I tested this redesign
successfully with release slimer on FF 52. Then on aws linux 2 with FF 57 and beta slimer, I was no
longer getting the "errcode: 99, desc: an unknown network-related error was detected (2152924148)"
for all the urls being proxied thru cloudfront to s3 buckets. However, my servlet was still getting these
errrors.

What does my servlet do? It simply creates a blob in s3, and the first time it created a blob for a given set of qs params, it servers that binary stream. However, subsequent times, when encountering the same qs params that point to the same effective blob, it does a 302 redirect to the s3 blob using the cloudfront proxy url for that blob. I suspect that this 302 is triggering a problem.

Two notes: the 302 redirect is using an absolute url for the current domain, beginning with /, and
not an http absolute url beginning with https://. Also, I don't think bucket write-and-read-visibility
latency is a problem, because I saw the similar error when I was doing changeUrl.

Also, the function that sees the error is:
_page.onResourceError = function (obj) {
console.log('onrsrcerr: url: ' + obj.url + ', errcode: ' + obj.errorCode + ', desc: ' + obj.errorString);
}

@andynuss
Copy link
Author

Reproduced this problem with rc.1 and FF 57. Will try with rc.1 and FF 58 and FF 59 tomorrow.

@andynuss
Copy link
Author

I was mistaken. My redirect works now on rc.1. Looked more carefully at the logs and there were some errcode 99s that were similar, but explained due to the fact that slimer had already been asked for a clean exit.

@survtur
Copy link

survtur commented Sep 23, 2021

Did I understand correct, that you only changed version of SlimerJs and problem gone?
Or there was something else you did? My SlimerJs 1.0.0 still get same error.

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