Skip to content
This repository has been archived by the owner on Feb 12, 2024. It is now read-only.

Failed to import DAG: Unexpected upload type #3882

Closed
alanshaw opened this issue Sep 20, 2021 · 1 comment · Fixed by #3890
Closed

Failed to import DAG: Unexpected upload type #3882

alanshaw opened this issue Sep 20, 2021 · 1 comment · Fixed by #3890
Labels
kind/bug A bug in existing code (including security flaws) need/triage Needs initial labeling and prioritization

Comments

@alanshaw
Copy link
Member

With daemon running I get the following error:

ipfs dag import test.car
importing from test.car...
Failed to import DAG: Unexpected upload type

Without daemon running I get a CID back that is not the root CID in the CAR file:

ipfs dag import ./test.car
importing from ./test.car...
pinned root	zdj7WW3mdMLKDE2ebEb1u4XMW5QR6b9fuDJdtRTYJCWTJD3X4	successipfs-car --list-roots ./test.car 
bafybeiajgb55e6i45k4ihhc6c4evvzxkrbpdn2ep3vwocnqdoet53rkda4
  • Version:
ipfs version --all
js-ipfs version: 0.10.8-b5488cb3ef5ab7ea24b8b2275ffa8cfa4b7b7ed1
interface-ipfs-core version: ^0.150.4
ipfs-http-client version: undefined
Repo version: 11
System version: x64/darwin
Node.js version: v16.5.0
Commit: b5488cb3ef5ab7ea24b8b2275ffa8cfa4b7b7ed1
  • Platform:
  • Subsystem:

Severity:

Description:

Steps to reproduce the error:

@alanshaw alanshaw added kind/bug A bug in existing code (including security flaws) need/triage Needs initial labeling and prioritization labels Sep 20, 2021
@achingbrain
Copy link
Member

Without daemon running I get a CID back that is not the root CID in the CAR file:

The CIDs are the same, the first is a CIDv1 in base58btc, the second is CIDv1 in base32.

$ jsipfs cid base32 zdj7WW3mdMLKDE2ebEb1u4XMW5QR6b9fuDJdtRTYJCWTJD3X4
bafybeiajgb55e6i45k4ihhc6c4evvzxkrbpdn2ep3vwocnqdoet53rkda4

If you run the same command with the --cid-base flag you should see the same as ipfs-car, which appears to use different defaults:

$ ipfs dag import ./test.car --cid-base base32
importing from /Users/alex/Downloads/test.car...
pinned root	bafybeiajgb55e6i45k4ihhc6c4evvzxkrbpdn2ep3vwocnqdoet53rkda4	success

achingbrain added a commit that referenced this issue Sep 23, 2021
Readable streams returned from `fs.createReadStream` have a `.path`
property which was throwing off the content normalisation.

Fixes #3882
achingbrain added a commit that referenced this issue Sep 24, 2021
Readable streams returned from `fs.createReadStream` have a `.path`
property which was throwing off the content normalisation.

Fixes #3882
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
kind/bug A bug in existing code (including security flaws) need/triage Needs initial labeling and prioritization
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants