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

ValueError: imagecolorsforindex(): Argument #2 ($color) is out of range #37890

Closed
1 of 5 tasks
adarshkhatri opened this issue Aug 18, 2023 · 26 comments
Closed
1 of 5 tasks
Assignees
Labels
Issue: needs update Additional information is require, waiting for response Reported on 2.4.4-p1 Indicates original Magento version for the Issue report.

Comments

@adarshkhatri
Copy link
Contributor

adarshkhatri commented Aug 18, 2023

Preconditions and environment

  • 2.4.4-p1 commerce
  • VisualMerchandiser turned on

Steps to reproduce

Go to any product,

  1. Add this image to a product and make it base, small, thumb all
    360-waw28460au
  2. Save the product
  3. Go to Category edit page in admin and edit the category that above product is assigned to
  4. Observe

Expected result

Page should load without any error.The page

Actual result

Page breaks while loading. Error thrown on system:

ValueError: imagecolorsforindex(): Argument #2 ($color) is out of range in vendor/magento/framework/Image/Adapter/Gd2.php:347

Additional information

The big problem with this is that we don't know which image is throwing the error. Spent good amount of time to pinpoint the product that had this image.

And surprisingly, the image loads in FE just fine.

Release note

No response

Triage and priority

  • Severity: S0 - Affects critical data or functionality and leaves users without workaround.
  • Severity: S1 - Affects critical data or functionality and forces users to employ a workaround.
  • Severity: S2 - Affects non-critical data or functionality and forces users to employ a workaround.
  • Severity: S3 - Affects non-critical data or functionality and does not force users to employ a workaround.
  • Severity: S4 - Affects aesthetics, professional look and feel, “quality” or “usability”.
@m2-assistant
Copy link

m2-assistant bot commented Aug 18, 2023

Hi @adarshkhatri. Thank you for your report.
To speed up processing of this issue, make sure that the issue is reproducible on the vanilla Magento instance following Steps to reproduce. To deploy vanilla Magento instance on our environment, Add a comment to the issue:


Join Magento Community Engineering Slack and ask your questions in #github channel.
⚠️ According to the Magento Contribution requirements, all issues must go through the Community Contributions Triage process. Community Contributions Triage is a public meeting.
🕙 You can find the schedule on the Magento Community Calendar page.
📞 The triage of issues happens in the queue order. If you want to speed up the delivery of your contribution, join the Community Contributions Triage session to discuss the appropriate ticket.

@adarshkhatri
Copy link
Contributor Author

@magento give me 2.4-develop instance

@magento-deployment-service
Copy link

Hi @adarshkhatri. Thank you for your request. I'm working on Magento instance for you.

@magento-deployment-service
Copy link

@engcom-Bravo engcom-Bravo self-assigned this Aug 18, 2023
@m2-assistant
Copy link

m2-assistant bot commented Aug 18, 2023

Hi @engcom-Bravo. Thank you for working on this issue.
In order to make sure that issue has enough information and ready for development, please read and check the following instruction: 👇

  • 1. Verify that issue has all the required information. (Preconditions, Steps to reproduce, Expected result, Actual result).
  • 2. Verify that issue has a meaningful description and provides enough information to reproduce the issue.
  • 3. Add Area: XXXXX label to the ticket, indicating the functional areas it may be related to.
  • 4. Verify that the issue is reproducible on 2.4-develop branch
    Details- Add the comment @magento give me 2.4-develop instance to deploy test instance on Magento infrastructure.
    - If the issue is reproducible on 2.4-develop branch, please, add the label Reproduced on 2.4.x.
    - If the issue is not reproducible, add your comment that issue is not reproducible and close the issue and stop verification process here!
  • 5. Add label Issue: Confirmed once verification is complete.
  • 6. Make sure that automatic system confirms that report has been added to the backlog.

@engcom-Bravo engcom-Bravo added the Reported on 2.4.4-p1 Indicates original Magento version for the Issue report. label Aug 18, 2023
@engcom-Bravo
Copy link
Contributor

@magento give me 2.4-develop instance

@magento-deployment-service
Copy link

Hi @engcom-Bravo. Thank you for your request. I'm working on Magento instance for you.

@magento-deployment-service
Copy link

@engcom-Bravo
Copy link
Contributor

Hi @adarshkhatri,

Thank you for reporting and collaboration.

Verified the issue on Magento 2.4-develop instance with EE edition and the issue is not reproducible.Kindly refer the attached video.

Steps to reproduce

  • Go to any product,
  • Add this image to a product and make it base, small, thumb all
  • Save the product
  • Go to Category edit page in admin and edit the category that above product is assigned to
  • Observe

Page is loading without any errors.

Screenshot 2023-08-18 at 12 24 29 PM
f8fdc542-765e-4b11-9b7f-85a41e263123.mp4

Kindly recheck the behaviour on Magento 2.4-develop instance with EE edition and elaborate steps to reproduce if the issue is still reproducible.

Thanks.

@engcom-Bravo engcom-Bravo added the Issue: needs update Additional information is require, waiting for response label Aug 18, 2023
@engcom-Bravo
Copy link
Contributor

Hi @adarshkhatri,

Kindly provide latest update on this comment #37890 (comment) still you are working on this issue if you are able to reproduce the issue please elaborate the steps to reproduce.Please let us know still if you are facing any issue.

Thanks.

@engcom-Bravo
Copy link
Contributor

Hi @adarshkhatri,

We have noticed that this issue has not been updated since long time.
Hence we assume that this issue is fixed now, so we are closing it. Please feel to raise a fresh ticket or reopen this ticket if you need more assistance on this.

Thanks.

@adarshkhatri
Copy link
Contributor Author

@magento give me 2.4-develop instance

@magento-deployment-service
Copy link

Hi @adarshkhatri. Thank you for your request. I'm working on Magento instance for you.

@magento-deployment-service
Copy link

@adarshkhatri
Copy link
Contributor Author

@magento give me 2.4.6-p2 instance

@magento-deployment-service
Copy link

Hi @adarshkhatri. Thank you for your request. I'm working on Magento instance for you.

@magento-deployment-service
Copy link

Hi @adarshkhatri, unfortunately there is no ability to deploy Magento instance at the moment. Please try again later.

@adarshkhatri
Copy link
Contributor Author

@magento give me 2.4.6-p2 instance

@magento-deployment-service
Copy link

Hi @adarshkhatri. Thank you for your request. I'm working on Magento instance for you.

@magento-deployment-service
Copy link

Hi @adarshkhatri, unfortunately there is no ability to deploy Magento instance at the moment. Please try again later.

@adarshkhatri
Copy link
Contributor Author

@magento give me 2.4.6-p2 instance

@magento-deployment-service
Copy link

Hi @adarshkhatri. Thank you for your request. I'm working on Magento instance for you.

@magento-deployment-service
Copy link

Hi @adarshkhatri, unfortunately there is no ability to deploy Magento instance at the moment. Please try again later.

@mohammedTBB
Copy link

same here, although I can upload the image in the admin but the error appeas in the exception.log and the image does not show in the fronend, also the error appears when throwing the resize command "bin/magento catalog:image:resize".
I have changed the adapter from gd to imagemagick and it works just fine
https://experienceleague.adobe.com/docs/commerce-admin/config/advanced/developer.html#image-processing-settings

@willbrammer
Copy link

I can replicate this on 2.4.6-p3 Magento. Removing all image roles from the image stopped the error.

Nothing with the image appears to be wrong

@adarshkhatri
Copy link
Contributor Author

It seems they have made some changes,

https://github.com/magento/magento2/blob/2.4.7-beta2/lib/internal/Magento/Framework/Image/Adapter/Gd2.php#L341

I haven't tested but it seems it will fix the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Issue: needs update Additional information is require, waiting for response Reported on 2.4.4-p1 Indicates original Magento version for the Issue report.
Projects
None yet
Development

No branches or pull requests

4 participants