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

abort method received a 403 error when stop connection on client side #4567

Open
shixiliufanglzh opened this issue Jun 25, 2021 · 6 comments
Assignees
Milestone

Comments

@shixiliufanglzh
Copy link

shixiliufanglzh commented Jun 25, 2021

After updating the version of this package from 2.4.1 to 2.4.2, once I call connection.stop() on client side, an error will be print on console panel as below screenshot:

image

I just create the connection after app initialized
this.connection = this._signalR.createConnection({url: this.electron.appConfig.baseUrl});
this.connection.start();

and then call stop method manually
this.connection.invoke('Logout');
setTimeout(() => {
  this.connection.stop();
  this.router.navigateByUrl('/login');
}, 3000);
Then the connection will not be disconnected as expected.
but when I rollback the version to 2.4.1, everything worked normally.

@BrennanConroy
Copy link
Member

Can you share the network trace for the abort request (specifically headers) from 2.4.1 and 2.4.2?

@halter73 halter73 added this to the 2.4.x milestone Jul 29, 2021
@halter73
Copy link
Member

It looks like we stopped respecting connection.withCredentials once we started using fetch for abort. If set, we probably need to set credentials: "include".

@halter73
Copy link
Member

@shixiliufanglzh Can you test adding credentials: "include" here in the 2.4.2 client and tell us if that fixes your issue?

@ismail-s
Copy link

ismail-s commented Oct 6, 2021

Hi @halter73.

We also have run into this issue (in our case, with a different error response, but still the same issue), and have found that your proposed fix #4567 (comment) does fix this issue for us. Do you have any idea how long it could take for this fix to get included in the next release?

Thanks,
Ismail

@BrennanConroy BrennanConroy modified the milestones: 2.4.x, 2.4.3 Oct 14, 2021
@adegroff
Copy link

@halter73 @BrennanConroy
Is there a pull request out there with this change for 2.4.3?
When will we expect version 2.4.3 to be released?

@BrennanConroy
Copy link
Member

2.4.3 is released with the fix for this issue, we're keeping the issue open to track adding a test.

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

5 participants