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

IPFS image upload error #5

Open
natsuki07 opened this issue Apr 28, 2022 · 23 comments · May be fixed by #17
Open

IPFS image upload error #5

natsuki07 opened this issue Apr 28, 2022 · 23 comments · May be fixed by #17

Comments

@natsuki07
Copy link

natsuki07 commented Apr 28, 2022

I've copied and pasted all of the codes from the repo. I got IPFE upload error below.
image

const result = await client.add(file) causes the error.
How can I solve this error?

@JasVavdiya
Copy link

i also facing same issue

@Adylitto
Copy link

I've copied and pasted all of the codes from the repo. I got IPFE upload error below.

image

const result = await client.add(file) causes the error.

How can I solve this error?

I'm not sure but I think it's about infura img hosting

@iamrishav
Copy link

iamrishav commented Aug 16, 2022

@ethan-crypto facing the same issue, anyone please tell me how to solve this issue

@ethan-crypto
Copy link
Contributor

Hi thanks for addressing this issue. I'll try to fix it this weekend when I have some free time.

@Mukund0079
Copy link

Mukund0079 commented Aug 18, 2022

This error occure because ipfs infura deprecating the public gateway on August 10th, 2022.
Capture

Please check steps to resolve that error :-
Mukund0079/blockchain-error#1 (comment)
or
Follow Below steps:-
Create a IPFS project by putting card details on (https://infura.io/product/ipfs)
Enable Dedicated Getway give any subdomain name.
image

npm install --save buffer

After that do the following changes in a code
1]
import { useState } from 'react'
import { ethers } from "ethers"
import { Row, Form, Button } from 'react-bootstrap'
import { Buffer } from 'buffer';

const ipfsClient = require('ipfs-http-client');
const projectId = '---Enter projectID from infura.io project---';
const projectSecret = '---Enter project secrate key from infura.io project---';
const auth =
'Basic ' + Buffer.from(projectId + ':' + projectSecret).toString('base64');

const client = ipfsClient.create({
host: 'ipfs.infura.io',
port: 5001,
protocol: 'https',
headers: {
authorization: auth,
},
});

2] setImage(https://(your gatway name).infura-ipfs.io/ipfs/${result.path}) // add your gatway name here you will get it from infura.io after enabling dedicated gatway
pasted image 0

3] const uri = https://(your gatway name).infura-ipfs.io/ipfs/${result.path}
// add your gatway name here you will get it from infura.io after enabling dedicated gatway

@marte462
Copy link

marte462 commented Aug 21, 2022

@Mukund0079 The above code doesn't work. Did you get this to work on your side? I have changed create.js with the above code and the NFTs do not load

@Mukund0079
Copy link

@Mukund0079 The above code doesn't work. Did you get this to work on your side? I have changed create.js with the above code and the NFTs do not load

Please follow steps after creating account on Infura it's worked for me try this once again

@marte462
Copy link

marte462 commented Aug 21, 2022

many thanks, using your code @Mukund0079 I redeployed. But the NFTs don't get displayed due to some SSL error. I assume you have the same issue with Infura. More information here: https://community.infura.io/t/ipfs-authentication-error-403-forbidden/5672/76

@Mukund0079
Copy link

many thanks, using your code @Mukund0079 I redeployed. But the NFTs don't get displayed due to some SSL error. I assume you have the same issue with Infura. More information here: https://community.infura.io/t/ipfs-authentication-error-403-forbidden/5672/76

Disconnect all VPN and try it will work I have already resolved SSL issu

@roshangeorge97
Copy link

is there any way to use platforms other than Infura?

@syeddaniyal0304
Copy link

yes you can use Pinata
I have used Pinata and it worked well for me
Code:
import { pinJSONToIPFS } from "./pinata.js";
const pinataResponse1 = await pinJSONToIPFS(metadata);

@IvayloSlavchev
Copy link

yes you can use Pinata I have used Pinata and it worked well for me Code: import { pinJSONToIPFS } from "./pinata.js"; const pinataResponse1 = await pinJSONToIPFS(metadata);

Hey there! Can you please provide the code that you used with pinata? I'll be very thankful!

@syeddaniyal0304
Copy link

syeddaniyal0304 commented Sep 18, 2022 via email

@BCWeb3
Copy link

BCWeb3 commented Sep 21, 2022

Hello there, I'd like to update with the Pinata code above which I'm grateful has been provided, but I'm new to development and I don't understand where to place this code within the Create.js file. I have tried a few places and I'm receiving errors, I have removed what I believe to be used for Infura. I'd be really grateful if you could provide a few novice tips please?

@syeddaniyal0304
Copy link

syeddaniyal0304 commented Sep 26, 2022 via email

@BCWeb3
Copy link

BCWeb3 commented Sep 26, 2022

Hello, really appreciate the response. I have pasted the code into the various files within my project but have the following errors. I'm taking a look through to see if I can make it work. But thought I'd post in case there's anything obvious going on or something I need to do. Thanks.

Failed to compile.

SyntaxError: /home/sirhc/nft-marketplace/src/frontend/components/App.js: Identifier directly after number. (61:4)
59 | setNFT(nft)
60 | // 9236b6B9c44D2b226Dd82Fc82eF53AEEf094AcbF

61 | 4E37cf85729523598bD766d8782d60B2F6cc9d72
| ^

Screenshot_20220926_181052

@syeddaniyal0304
Copy link

syeddaniyal0304 commented Sep 26, 2022 via email

@BCWeb3
Copy link

BCWeb3 commented Sep 27, 2022 via email

@Bhakti087
Copy link

Hello, fair enough. I'm unsure how to private message or perhaps this email is private now. I'm new to Github. Regarding gmail. You could send the project using a service like the following https://wetransfer.com/

Here's an email address you can contact me on @.***
I see my email has been *** out... If you did use 'We Transfer' you can select a 'transfer link' instead of entering a recipient's email address and post here - just a thought. Thank you for your help.

------- Original Message -------
On Monday, September 26th, 2022 at 18:24, Syed Daniyal Ahmed Shah @.> wrote: I can't solve like this. Do you have whatsapp or messenger So I can't explain you. And Gmail is not allowing me to send the complete project file On Mon, Sep 26, 2022, 10:17 PM BCWeb3 @.> wrote: > Hello, really appreciate the response. I have pasted the code into the > various files within my project but have the following errors. I'm taking a > look through to see if I can make it work. But thought I'd post in case > there's anything obvious going on or something I need to do. Thanks. > > Failed to compile. > > SyntaxError: /home/sirhc/nft-marketplace/src/frontend/components/App.js: > Identifier directly after number. (61:4) > 59 | setNFT(nft) > 60 | // 9236b6B9c44D2b226Dd82Fc82eF53AEEf094AcbF > > 61 | 4E37cf85729523598bD766d8782d60B2F6cc9d72 > | ^ > > [image: Screenshot_20220926_181052] > https://user-images.githubusercontent.com/114097402/192338995-abd3a1df-8c6e-4b63-9e38-012ca0f40c76.png > > — > Reply to this email directly, view it on GitHub > <#5 (comment)>, > or unsubscribe > https://github.com/notifications/unsubscribe-auth/ASCGPRQ5WW2B3EMOREWYRB3WAHLDVANCNFSM5URLUFZA > . > You are receiving this because you commented.Message ID: > @.> > — Reply to this email directly, [view it on GitHub](#5 (comment)), or unsubscribe. You are receiving this because you commented.Message ID: @.>

Hey did you find the solution ?

@BCWeb3
Copy link

BCWeb3 commented Sep 27, 2022

Hello, fair enough. I'm unsure how to private message or perhaps this email is private now. I'm new to Github. Regarding gmail. You could send the project using a service like the following https://wetransfer.com/

Here's an email address you can contact me on @.***
I see my email has been *** out... If you did use 'We Transfer' you can select a 'transfer link' instead of entering a recipient's email address and post here - just a thought. Thank you for your help.

------- Original Message -------
On Monday, September 26th, 2022 at 18:24, Syed Daniyal Ahmed Shah @.> wrote: I can't solve like this. Do you have whatsapp or messenger So I can't explain you. And Gmail is not allowing me to send the complete project file On Mon, Sep 26, 2022, 10:17 PM BCWeb3 _@**._> wrote: > Hello, really appreciate the response. I have pasted the code into the > various files within my project but have the following errors. I'm taking a > look through to see if I can make it work. But thought I'd post in case > there's anything obvious going on or something I need to do. Thanks. > > Failed to compile. > > SyntaxError: /home/sirhc/nft-marketplace/src/frontend/components/App.js: > Identifier directly after number. (61:4) > 59 | setNFT(nft) > 60 | // 9236b6B9c44D2b226Dd82Fc82eF53AEEf094AcbF > > 61 | 4E37cf85729523598bD766d8782d60B2F6cc9d72 > | ^ > > [image: Screenshot_20220926_181052] > https://user-images.githubusercontent.com/114097402/192338995-abd3a1df-8c6e-4b63-9e38-012ca0f40c76.png > > — > Reply to this email directly, view it on GitHub > <#5 (comment)>, > or unsubscribe > https://github.com/notifications/unsubscribe-auth/ASCGPRQ5WW2B3EMOREWYRB3WAHLDVANCNFSM5URLUFZA > . > You are receiving this because you commented.Message ID: > _@.> > — Reply to this email directly, [view it on GitHub](#5 (comment)), or unsubscribe. You are receiving this because you commented.Message ID: @.**_>

Hey did you find the solution ?

I haven't managed to get it to work yet - I'm trying to with Pinata. It appears some have got it to work with Infura above, and Pinata - so it's worth reading this thread. I think I'm not getting it to work because I'm new to this and missing the point here or there.

@roshangeorge97
Copy link

roshangeorge97 commented Dec 26, 2022 via email

@dhiraj-02
Copy link

many thanks, using your code @Mukund0079 I redeployed. But the NFTs don't get displayed due to some SSL error. I assume you have the same issue with Infura. More information here: https://community.infura.io/t/ipfs-authentication-error-403-forbidden/5672/76

Disconnect all VPN and try it will work I have already resolved SSL issu

can you please elaborate this, creating is working fine but the retrieval of those to the dashboard is not working

@upendra-eth
Copy link

Hello, I've solved all the issues you're experiencing while watching this video in 2023, explained the solution in a video to make it more beginner-friendly, and also uploaded the updated code to my git repository. Please find all links below

Video link - https://youtu.be/rHBuddTLzR0

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

Successfully merging a pull request may close this issue.