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

Filebase upload (storeBlob) not working #4525

Open
bbosch-d opened this issue Dec 31, 2024 · 1 comment
Open

Filebase upload (storeBlob) not working #4525

bbosch-d opened this issue Dec 31, 2024 · 1 comment
Assignees

Comments

@bbosch-d
Copy link
Contributor

Problem description

Filebase API key isn't being set correctly in the worker-service resulting in error during IPFS upload.

Step to reproduce

Steps to reproduce the behavior:

  1. Set env config to the following values:
IPFS_TIMEOUT="720" # seconds
IPFS_PROVIDER="filebase" # valid options: 'filebase', 'web3storage', 'local'
IPFS_STORAGE_KEY="<your API key>" # only valid for web3storage provider; ignored in other cases
IPFS_STORAGE_PROOF="..." # only valid for web3storage provider; ignored in other cases
IPFS_PUBLIC_GATEWAY='https://<your-three-words>.myfilebase.com/ipfs/${cid}'
IPFS_NODE_ADDRESS="http://ipfs-node:5001" # only valid for local provider; ignored in other cases
  1. Launch Guardian (in my case v2.24.1)
  2. Perform any action that results in IPFS upload
  3. Determine it didn't work

Expected behavior

An empty Filebase bucket should get at least 1 entry after performing an action that incurs an IPFS upload such as publishing a policy.

Screenshots

I "fixed" it by hard coding the API key as a string in the file worker-service/src/api/ipfs-client-class.ts:

            case IpfsProvider.FILEBASE: {
                let testClient = new FilebaseClient({ token: '<token>' } as any)
                cid = await testClient.storeBlob(new Blob([file]))
                break;
            }

In the original code the client is created in a different section of the code, like this:
client = new FilebaseClient({token: this.options.filebase} as any)

I suspect simply the this.options.filebase reference isn't reading the config value properly.

@Pyatakov Pyatakov self-assigned this Jan 8, 2025
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

3 participants
@Pyatakov @bbosch-d and others