adrianhajdin / project_nextjs13_flexibble

https://jsmastery.pro
639 stars 133 forks source link

Error 500 #32

Open abuzayn12 opened 10 months ago

abuzayn12 commented 10 months ago

i get a server 500 error post and the response says 'Failed to upload image on Cloudinary'

i have been looking for a while where the mistake is but can't find anaything can somone maybe help

Kayange123 commented 10 months ago

Hello @abuzayn12, your problem seems to rely on cloudinary configurations. Be sure to have cloudinary configuration object with correct and valid key-value pairs

Ayush-ydv commented 10 months ago

@Kayange123 I faced a similar issue, and upon investigation, I realized that the problem stemmed from my incorrect utilization of Cloudinary's name, key, and secret configuration. If you're encountering the same difficulty, this solution might be helpful to you.

When populating the CLOUDINARY_SECRET field within your .env file, ensure that you enter it as a sequence of characters, for example:

CLOUDINARY_SECRET="aioehfiuaegniunfianeginwejn"

Avoid using asterisks or any masked characters like:

CLOUDINARY_SECRET="*****"

Using actual characters will help in establishing the correct connection and resolving the error.

Kayange123 commented 10 months ago

@Ayush-ydv thanks for a tip, did you manage to create a project?? It has been throwing lots of errors on my side despite using the same code, does it have anything to do with versions of graphql-request dependency?

Ayush-ydv commented 10 months ago

I have successfully completed the project and deployed it. However, there is one issue pertaining to the 'create project' functionality that requires my attention. Apart from this, please feel free to indicate the specific area in which you are encountering difficulties or provide the timestamp from the video. I would be more than willing to assist you with resolving the matter.

On Sun, 27 Aug, 2023, 1:26 am Ayubu Kayange, @.***> wrote:

@Ayush-ydv https://github.com/Ayush-ydv thanks for a tip, did you manage to create a project?? It has been throwing lots of errors on my side despite using the same code, does it have anything to do with versions of graphql-request dependency?

— Reply to this email directly, view it on GitHub https://github.com/adrianhajdin/project_nextjs13_flexibble/issues/32#issuecomment-1694491254, or unsubscribe https://github.com/notifications/unsubscribe-auth/ARSRVWFF5OMI2SHIQN5OUKLXXJIHFANCNFSM6AAAAAA3XKDESA . You are receiving this because you were mentioned.Message ID: @.***>

abuzayn12 commented 10 months ago

@Kayange123 I faced a similar issue, and upon investigation, I realized that the problem stemmed from my incorrect utilization of Cloudinary's name, key, and secret configuration. If you're encountering the same difficulty, this solution might be helpful to you.

When populating the CLOUDINARY_SECRET field within your .env file, ensure that you enter it as a sequence of characters, for example:

CLOUDINARY_SECRET="aioehfiuaegniunfianeginwejn"

Avoid using asterisks or any masked characters like:

CLOUDINARY_SECRET="*****"

Using actual characters will help in establishing the correct connection and resolving the error.

Hii thank you for you response i have look into the .env file but it seems to be fine i think, i have it like this

Scherm­afbeelding 2023-08-27 om 14 11 45
abuzayn12 commented 10 months ago

@Kayange123 I faced a similar issue, and upon investigation, I realized that the problem stemmed from my incorrect utilization of Cloudinary's name, key, and secret configuration. If you're encountering the same difficulty, this solution might be helpful to you. When populating the CLOUDINARY_SECRET field within your .env file, ensure that you enter it as a sequence of characters, for example: CLOUDINARY_SECRET="aioehfiuaegniunfianeginwejn" Avoid using asterisks or any masked characters like: CLOUDINARY_SECRET="*****" Using actual characters will help in establishing the correct connection and resolving the error.

Hii thank you for you response i have look into the .env file but it seems to be fine i think, i have it like this Scherm­afbeelding 2023-08-27 om 14 11 45

sorry i forgot to mention, i still have the same error but i don't know whyy

Kayange123 commented 10 months ago

@abuzayn12 Try using keys directly from the cloudinary config instead of .env (but remember to remove and put them back to .env after you are done). This will assure you that of all problems you are thinking of, keys not being populated from .env file is not among them. If still facing same problem try double watching the tutorial.

abuzayn12 commented 10 months ago

@abuzayn12 Try using keys directly from the cloudinary config instead of .env (but remember to remove and put them back to .env after you are done). This will assure you that of all problems you are thinking of, keys not being populated from .env file is not among them. If still facing same problem try double watching the tutorial.

Thankkk youu verry muchh 🙏 it finally worked. but does that mean that there is maybe something wrong with my .env file or config?

Ayush-ydv commented 10 months ago

@abuzayn12 I've noticed an inconsistency in your .env file. It appears that you might have inadvertently misspelled "CLOUDINARY_SECRET" as "SECTRET." This inconsistency could be the cause of the problem. Additionally, I recommend cross-checking this with your "app/api/upload/route.ts" file to ensure that you've used the correct spelling, "SECRET." You can refer to the following image for clarification: image Please let me know if addressing this discrepancy resolves the issue.

ValkonX33 commented 10 months ago

Hey i'm stuck with issue from like 15 days please anyone help me i've downloaded the adrian's code from github and copied my env's in there but it still throwing this 500 internal server error @Ayush-ydv please look into this matter

ValkonX33 commented 10 months ago

image

here's my env

abuzayn12 commented 10 months ago

@abuzayn12 I've noticed an inconsistency in your .env file. It appears that you might have inadvertently misspelled "CLOUDINARY_SECRET" as "SECTRET." This inconsistency could be the cause of the problem. Additionally, I recommend cross-checking this with your "app/api/upload/route.ts" file to ensure that you've used the correct spelling, "SECRET." You can refer to the following image for clarification: image Please let me know if addressing this discrepancy resolves the issue.

Hiiii thankkkks verrry muchh it was indeed the mistake i had made but it solved my problem

ValkonX33 commented 9 months ago

@abuzayn12 I've noticed an inconsistency in your .env file. It appears that you might have inadvertently misspelled "CLOUDINARY_SECRET" as "SECTRET." This inconsistency could be the cause of the problem. Additionally, I recommend cross-checking this with your "app/api/upload/route.ts" file to ensure that you've used the correct spelling, "SECRET." You can refer to the following image for clarification: image Please let me know if addressing this discrepancy resolves the issue.

Hiiii thankkkks verrry muchh it was indeed the mistake i had made but it solved my problem

hey can you help me please i have the same issue