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

[Bug]: Images getting blocked in Events #266

Open
1 task
gbowne1 opened this issue Jun 28, 2023 · 20 comments
Open
1 task

[Bug]: Images getting blocked in Events #266

gbowne1 opened this issue Jun 28, 2023 · 20 comments
Labels
bug Something isn't working cors-issue This issue is related to CORS design devops this is a devops related feature or issue or PR enhancement New feature or request feature This should be a new feature. frontend This is a frontend issue or PR good first issue Good for newcomers help wanted Extra attention is needed low-complexity This is a low complexity or beginner issue tech-debt This needs refactoring or improvement

Comments

@gbowne1
Copy link
Owner

gbowne1 commented Jun 28, 2023

Describe the Bug

In the console, while navigated to /events, the images are getting CORS' blocked with a NS_BINDING_ABORTED error, in particular the ones from shutterstock. We need to implement a method for handling CORS for images people post for their event(s). We do have CORS package installed on the server.

Steps to Reproduce

Start the React development server

Go to /events or click on the Events in the SideNav

Inspect the page using the console.

Screenshots

No response

Which device are you using?

PC Desktop, x64 Core i7 3rd Gen

Which operating system are you using?

Linux x64, Debian Base

Which browser are you using?

Firefox 112

Additional Context

No response

Contribute

  • I am willing to contribute and submit a pull request
@gbowne1 gbowne1 added this to the Posting & Sharing milestone Jun 28, 2023
@gbowne1 gbowne1 added the cors-issue This issue is related to CORS label Jun 28, 2023
@NigamDevansh
Copy link
Contributor

@gbowne1 can i work on this issue.

@gbowne1
Copy link
Owner Author

gbowne1 commented Jul 3, 2023

Ok @NigamDevansh

@NigamDevansh
Copy link
Contributor

@gbowne1 so the problem is, we unable to fetch the images of those events which are having shutterstock images as event image url ?
please correct me if i'm wrong.

@NigamDevansh
Copy link
Contributor

NigamDevansh commented Jul 4, 2023

also when i was going through the /friends route their were two warnings:

  • One was "Invalid prop children of type array supplied to Panel, expected object." which I removed by changing the propType of children in panel to ".node" from ".object" asPropTypes.object expects the children prop to be a single React element (e.g., a single JSX element or a component), not an array of elements. When you pass multiple JSX elements as children to a component, React automatically wraps them in an array.
  • Second error was in friends component the children prop was `required so I just commented it out so if needed one can easily uncomment it and use it.
  • Also added the image to the friends list over at card media.

@gbowne1
Copy link
Owner Author

gbowne1 commented Jul 4, 2023

@NigamDevansh

Yes, The images are not available because the images are blocked by cors.

The Friends and Panel issues are separate from this issue.

@NigamDevansh
Copy link
Contributor

NigamDevansh commented Jul 4, 2023

I have created two events one using chrome and one using firefox and both of them are being rendered properly and i have used the shutterstock images in both the events in the image url.
@gbowne1
also can you tell me the issue number of the friends and the panel warnings are so that i can make the pr over their as well

@gbowne1
Copy link
Owner Author

gbowne1 commented Jul 4, 2023

@NigamDevansh I opened #275 as a new issue for this.

@gbowne1
Copy link
Owner Author

gbowne1 commented Jul 4, 2023

You should see the message NS_BINDING_ABORTED in the browser console likely the network tab when on /friends for the images. This is coming from cors.

@NigamDevansh
Copy link
Contributor

can you share a screenshot of the error

@gbowne1
Copy link
Owner Author

gbowne1 commented Jul 4, 2023

@NigamDevansh

A screenshot with the Firefox 112 browser console open while navigated to /events

Look at the Network tab "Transferred" column. Even though the images resulted in a 200 GET it still responded with NS_BINDING_ABORTED.

Screenshot_2023-07-04_13-19-21

@gbowne1
Copy link
Owner Author

gbowne1 commented Jul 5, 2023

Any ideas @manuel12 ?

@gbowne1
Copy link
Owner Author

gbowne1 commented Oct 6, 2023

Unassigning since the last was in July '23. This issue is now available for request.

@gbowne1 gbowne1 added bug Something isn't working help wanted Extra attention is needed question Further information is requested css Issues with css frontend This is a frontend issue or PR medium-priority needs-testing This needs testing medium-complexity This issue is medium complexity low-complexity This is a low complexity or beginner issue tech-debt This needs refactoring or improvement hacktoberfest The hacktoberfest label labels Oct 6, 2023
@gbowne1
Copy link
Owner Author

gbowne1 commented Oct 10, 2023

@balajik

@balajik
Copy link
Collaborator

balajik commented Oct 11, 2023

@gbowne1 I'm not familiar with Firefox browser and it's error messages. But I sure that this is not a CORS or Shutterstock issue as CORS error will happen in all the browsers.

I believe this is an error from the browser behaviour to cancel or abort the http request when navigated to another page when current page is loading the assets.

Can you check/confirm if this error have any visual impact in the application? If it's not, then I don't think we need to worry about it. 🙂

@manuel12 @pawel975

@gbowne1
Copy link
Owner Author

gbowne1 commented Oct 11, 2023

@balajik

  1. I just wondered if this issue still exists
  2. I have had a quest to make this application as error free as possible.
  3. I wondered if it was indeed browser behavior.
  4. To my knowledge, it does not have any visual impact
  5. I also wonder if we can just cancel this issue or do we need to do some testing.

@balajik
Copy link
Collaborator

balajik commented Oct 11, 2023

@gbowne1 we can do some testing to confirm the behaviour and based on that we can close this issue.

@gbowne1
Copy link
Owner Author

gbowne1 commented Oct 11, 2023

We are using RTL, Jest and Cypress. Shouldn't be too hard to come up with a test.

I just don't wanna prematurely close or ignore an issue that might be there.

@gbowne1
Copy link
Owner Author

gbowne1 commented Oct 11, 2023

I also was focused on @NigamDevansh's 2nd comment in this thread.

@balajik
Copy link
Collaborator

balajik commented Oct 11, 2023

also when i was going through the /friends route their were two warnings:

  • One was "Invalid prop children of type array supplied to Panel, expected object." which I removed by changing the propType of children in panel to ".node" from ".object" asPropTypes.object expects the children prop to be a single React element (e.g., a single JSX element or a component), not an array of elements. When you pass multiple JSX elements as children to a component, React automatically wraps them in an array.
  • Second error was in friends component the children prop was `required so I just commented it out so if needed one can easily uncomment it and use it.
  • Also added the image to the friends list over at card media.

@gbowne1 - this comment right?

@gbowne1
Copy link
Owner Author

gbowne1 commented Oct 11, 2023

yes @balajik

@gbowne1 gbowne1 added bug Something isn't working enhancement New feature or request help wanted Extra attention is needed good first issue Good for newcomers frontend This is a frontend issue or PR design low-complexity This is a low complexity or beginner issue feature This should be a new feature. tech-debt This needs refactoring or improvement cors-issue This issue is related to CORS devops this is a devops related feature or issue or PR and removed bug Something isn't working help wanted Extra attention is needed question Further information is requested css Issues with css frontend This is a frontend issue or PR medium-priority needs-testing This needs testing medium-complexity This issue is medium complexity low-complexity This is a low complexity or beginner issue tech-debt This needs refactoring or improvement cors-issue This issue is related to CORS hacktoberfest The hacktoberfest label labels Feb 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working cors-issue This issue is related to CORS design devops this is a devops related feature or issue or PR enhancement New feature or request feature This should be a new feature. frontend This is a frontend issue or PR good first issue Good for newcomers help wanted Extra attention is needed low-complexity This is a low complexity or beginner issue tech-debt This needs refactoring or improvement
Projects
Development

No branches or pull requests

3 participants