Skip to content

console: --jspath & --preload fails with 'no such file or directory' (duplicate relative path) #273

@meowsbits

Description

@meowsbits

System information

> ./build/bin/geth version
CoreGeth
Version: 1.11.21-unstable
Git Commit: 73e58be77b18830b2a71f3d9bb1e1d7963d4f975
Git Commit Date: 20201229
Architecture: amd64
Protocol Versions: [65 64 63]
Go Version: go1.15.5
Operating System: linux
GOPATH=/home/ia/go
GOROOT=/home/ia/go1.15.5.linux-amd64

Expected behaviour

Combining --jspath=<some/dirpath> --preload=<file.js> yields a console preloading the file at <some/dirpath/file.js>.

Actual behaviour

Fatal: Failed to start the JavaScript console: .ia/console-scripts/exit-when-100.js: open .ia/console-scripts/.ia/console-scripts/exit-when-100.js: no such file or directory

Steps to reproduce the behaviour

> tree .ia/console-scripts/
.ia/console-scripts/
└── exit-when-100.js

0 directories, 1 file

> ./build/bin/geth --classic --datadir ./dd --jspath=.ia/console-scripts --preload=exit-when-100.js console

Backtrace

> ./build/bin/geth --classic --datadir ./dd --jspath=.ia/console-scripts --preload=exit-when-100.js console
INFO [12-30|07:23:16.440] Starting Geth on Ethereum Classic... 
INFO [12-30|07:23:16.441] Maximum peer count                       ETH=50 LES=0 total=50
INFO [12-30|07:23:16.441] Smartcard socket not found, disabling    err="stat /run/pcscd/pcscd.comm: no such file or directory"
INFO [12-30|07:23:16.443] Set global gas cap                       cap=25000000
INFO [12-30|07:23:16.449] Allocated trie memory caches             clean=256.00MiB dirty=256.00MiB
INFO [12-30|07:23:16.449] Allocated cache and file handles         database=/home/ia/go/src/github.com/ethereum/go-ethereum/dd/geth/chaindata cache=512.00MiB handles=524288
INFO [12-30|07:23:16.476] Opened ancient database                  database=/home/ia/go/src/github.com/ethereum/go-ethereum/dd/geth/chaindata/ancient
INFO [12-30|07:23:16.577] Persisted trie from memory database      nodes=12356 size=1.78MiB time=19.367767ms gcnodes=0 gcsize=0.00B gctime=0s livenodes=1 livesize=0.00B
INFO [12-30|07:23:16.578] Found stored genesis block               config="NetworkID: 1, ChainID: 61 Engine: ethash ECBP1100: 11380000 EIP1014: 9573000 EIP1052: 9573000 EIP1108: 10500839 EIP1344: 10500839 EIP140: 8772000 EIP145: 9573000 EIP150: 2500000 EIP152: 10500839 EIP155: 3000000 EIP160: 3000000 EIP161abc: 8772000 EIP161d: 8772000 EIP170: 8772000 EIP1884: 10500839 EIP198: 8772000 EIP2028: 10500839 EIP211: 8772000 EIP212: 8772000 EIP213: 8772000 EIP214: 8772000 EIP2200: 10500839 EIP2: 1150000 EIP658: 8772000 EIP7: 1150000 EthashECIP1010Continue: 5000000 EthashECIP1010Pause: 3000000 EthashECIP1017: 5000000 EthashECIP1041: 5900000 EthashECIP1099: 11700000 EthashEIP100B: 8772000 EthashHomestead: 1150000 "
INFO [12-30|07:23:16.578] Initialised chain configuration          config="NetworkID: 1, ChainID: 61 Engine: ethash ECBP1100: 11380000 EIP1014: 9573000 EIP1052: 9573000 EIP1108: 10500839 EIP1344: 10500839 EIP140: 8772000 EIP145: 9573000 EIP150: 2500000 EIP152: 10500839 EIP155: 3000000 EIP160: 3000000 EIP161abc: 8772000 EIP161d: 8772000 EIP170: 8772000 EIP1884: 10500839 EIP198: 8772000 EIP2028: 10500839 EIP211: 8772000 EIP212: 8772000 EIP213: 8772000 EIP214: 8772000 EIP2200: 10500839 EIP2: 1150000 EIP658: 8772000 EIP7: 1150000 EthashECIP1010Continue: 5000000 EthashECIP1010Pause: 3000000 EthashECIP1017: 5000000 EthashECIP1041: 5900000 EthashECIP1099: 11700000 EthashEIP100B: 8772000 EthashHomestead: 1150000 "
INFO [12-30|07:23:16.579] Disk storage enabled for ethash caches   dir=/home/ia/go/src/github.com/ethereum/go-ethereum/dd/geth/etchash count=3
INFO [12-30|07:23:16.579] Disk storage enabled for ethash DAGs     dir=/home/ia/.etchash count=2
INFO [12-30|07:23:16.579] Initialising Ethereum protocol           versions="[65 64 63]" network=1 dbversion=8
INFO [12-30|07:23:16.580] Loaded most recent local header          number=47808 hash="b78bb3…9e8059" td=45103156440823665 age=5y5mo3w
INFO [12-30|07:23:16.580] Loaded most recent local full block      number=0     hash="d4e567…cb8fa3" td=17179869184       age=51y8mo3w
INFO [12-30|07:23:16.580] Loaded most recent local fast block      number=14872 hash="e7d357…0e63f4" td=5905959952369361  age=5y5mo4w
INFO [12-30|07:23:16.580] Loaded last fast-sync pivot marker       number=11896424
INFO [12-30|07:23:16.580] Loaded local transaction journal         transactions=0 dropped=0
INFO [12-30|07:23:16.580] Upgrading chain index                    type=bloombits percentage=27
INFO [12-30|07:23:16.580] Regenerated local transaction journal    transactions=0 accounts=0
INFO [12-30|07:23:16.586] Allocated fast sync bloom                size=512.00MiB
INFO [12-30|07:23:16.589] Starting peer-to-peer node               instance=CoreGeth/v1.11.21-unstable-73e58be7-20201229/linux-amd64/go1.15.5
INFO [12-30|07:23:16.625] New local node record                    seq=23 id=a7fa74ce6b9e8e05 ip=127.0.0.1 udp=30303 tcp=30303
INFO [12-30|07:23:16.626] Started P2P networking                   self=enode://062ba56997086826563e655bfc0bfede4238e6137923478a84352f6e584fd55578aedb9855aa72ddc9f3923ece7bad1fea3fa9fa5e5b3e19a17d5c4cccb2a59d@127.0.0.1:30303
INFO [12-30|07:23:16.626] Mapped network port                      proto=udp extport=30303 intport=30303 interface=NAT-PMP(192.168.86.1)
INFO [12-30|07:23:16.627] IPC endpoint opened                      url=/home/ia/go/src/github.com/ethereum/go-ethereum/dd/geth.ipc
INFO [12-30|07:23:16.636] New local node record                    seq=24 id=a7fa74ce6b9e8e05 ip=75.134.144.252 udp=30303 tcp=30303
INFO [12-30|07:23:16.637] Mapped network port                      proto=tcp extport=30303 intport=30303 interface=NAT-PMP(192.168.86.1)
Fatal: Failed to start the JavaScript console: .ia/console-scripts/exit-when-100.js: open .ia/console-scripts/.ia/console-scripts/exit-when-100.js: no such file or directory

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions