Closed ygd2013520 closed 6 years ago
Hello,
thanks for the bug report. It looks like it can be a bug in pouchdb (the local database used for metadata), but maybe it's an error from the file system. What says the following commands?
# mount
# ls -al ~/cozy
# ls -alR ~/.cozy-desktop
Did you try again to start cozy-desktop sync
to see if the error is still there?
@nono I install the cozy-desktop on raspberry,doses it matter???And the cozy server is raspberry too. root@raspberrypi:~# mount /dev/mmcblk0p2 on / type ext4 (rw,noatime,data=ordered) devtmpfs on /dev type devtmpfs (rw,relatime,size=469544k,nr_inodes=117386,mode=755) sysfs on /sys type sysfs (rw,nosuid,nodev,noexec,relatime) proc on /proc type proc (rw,relatime) tmpfs on /dev/shm type tmpfs (rw,nosuid,nodev) devpts on /dev/pts type devpts (rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000) tmpfs on /run type tmpfs (rw,nosuid,nodev,mode=755) tmpfs on /run/lock type tmpfs (rw,nosuid,nodev,noexec,relatime,size=5120k) tmpfs on /sys/fs/cgroup type tmpfs (ro,nosuid,nodev,noexec,mode=755) cgroup on /sys/fs/cgroup/systemd type cgroup (rw,nosuid,nodev,noexec,relatime,xattr,release_agent=/lib/systemd/systemd-cgroups-agent,name=systemd) cgroup on /sys/fs/cgroup/cpu,cpuacct type cgroup (rw,nosuid,nodev,noexec,relatime,cpu,cpuacct) cgroup on /sys/fs/cgroup/blkio type cgroup (rw,nosuid,nodev,noexec,relatime,blkio) cgroup on /sys/fs/cgroup/memory type cgroup (rw,nosuid,nodev,noexec,relatime,memory) cgroup on /sys/fs/cgroup/devices type cgroup (rw,nosuid,nodev,noexec,relatime,devices) cgroup on /sys/fs/cgroup/freezer type cgroup (rw,nosuid,nodev,noexec,relatime,freezer) cgroup on /sys/fs/cgroup/net_cls type cgroup (rw,nosuid,nodev,noexec,relatime,net_cls) systemd-1 on /proc/sys/fs/binfmt_misc type autofs (rw,relatime,fd=22,pgrp=1,timeout=300,minproto=5,maxproto=5,direct) mqueue on /dev/mqueue type mqueue (rw,relatime) debugfs on /sys/kernel/debug type debugfs (rw,relatime) fusectl on /sys/fs/fuse/connections type fusectl (rw,relatime) configfs on /sys/kernel/config type configfs (rw,relatime) /dev/mmcblk0p1 on /boot type vfat (rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=ascii,shortname=mixed,errors=remount-ro) tmpfs on /run/user/1000 type tmpfs (rw,nosuid,nodev,relatime,size=94780k,mode=700,uid=1000,gid=1000) gvfsd-fuse on /run/user/1000/gvfs type fuse.gvfsd-fuse (rw,nosuid,nodev,relatime,user_id=1000,group_id=1000)
root@raspberrypi:~# ls -al ~/cozy total 8 drwxr-xr-x 2 root root 4096 May 30 09:36 . drwx------ 6 root root 4096 May 30 09:36 ..
root@raspberrypi:~# ls -alR ~/.cozy-desktop /root/.cozy-desktop: total 20 drwxr-xr-x 4 root root 4096 May 27 02:24 . drwx------ 6 root root 4096 May 30 09:36 .. -rw-r--r-- 1 root root 1369 May 30 09:40 config.json drwxr-xr-x 2 root root 4096 May 30 09:40 db drwxr-xr-x 2 root root 4096 May 30 09:40 db-mrview-94c25f1c0e5fd8a4bd22affb4050959d
/root/.cozy-desktop/db: total 44 drwxr-xr-x 2 root root 4096 May 30 09:40 . drwxr-xr-x 4 root root 4096 May 27 02:24 .. -rw-r--r-- 1 root root 3047 May 30 09:34 000118.ldb -rw-r--r-- 1 root root 237 May 30 09:37 000126.ldb -rw-r--r-- 1 root root 1277 May 30 09:40 000129.ldb -rw-r--r-- 1 root root 1322 May 30 09:40 000132.ldb -rw-r--r-- 1 root root 2210 May 30 09:40 000133.log -rw-r--r-- 1 root root 16 May 30 09:40 CURRENT -rw-r--r-- 1 root root 0 May 26 01:29 LOCK -rw-r--r-- 1 root root 300 May 30 09:40 LOG -rw-r--r-- 1 root root 300 May 30 09:40 LOG.old -rw-r--r-- 1 root root 400 May 30 09:40 MANIFEST-000131
/root/.cozy-desktop/db-mrview-94c25f1c0e5fd8a4bd22affb4050959d: total 36 drwxr-xr-x 2 root root 4096 May 30 09:40 . drwxr-xr-x 4 root root 4096 May 27 02:24 .. -rw-r--r-- 1 root root 1048 May 30 09:40 000042.ldb -rw-r--r-- 1 root root 1091 May 30 09:40 000044.ldb -rw-r--r-- 1 root root 85 May 30 09:40 000045.log -rw-r--r-- 1 root root 16 May 30 09:40 CURRENT -rw-r--r-- 1 root root 0 May 27 02:24 LOCK -rw-r--r-- 1 root root 295 May 30 09:40 LOG -rw-r--r-- 1 root root 853 May 30 09:40 LOG.old -rw-r--r-- 1 root root 244 May 30 09:40 MANIFEST-000043
It shouldn't matter, but I haven't tested it on a RPi. So, maybe, there is something special that I don't see.
Thanks very much. I will try it on other linux. What's the linux you test? centos or ubuntu??
I'm using ubuntu
@nono hello,I have tested cozy-desktop on centos7 and ubuntu ,but it show the same bug ,if you know how to resolve this bug latter,please give me advice,thank you!
Thanks for testing. It's weird that the bug is reproduced on ubuntu. We will try to understand this bug and inform you if we find something that can help.
I think I am also facing this issue ? with master branch
Hello there! Sorry for the late answer.
@ygd2013520, @rzr, are you still encountering this issue?
@ygd2013520 are you still using the 0.12.0 version on CentOS 7 ? Or the latest published version? (I believe it's 0.13.0, while master is 0.16.0 so we're a bit late on npm)
@rzr And are you still getting this issue on master? I wonder since pouchdb was upgraded from 5.4.5 to 6.1.0 recently... Are you also using a Rpi? If that was the case, I could eventually set up one to investigate...
Thank you!
@sebn , did I mention about RPI ? I have one but I don't think I used cc on it before,
I am testing master with the changes: https://github.com/cozy-labs/cozy-desktop/pull/483
So far so good, I have cloned 300M on 9GB...
It failed after 4GB, and failed on resuming but maybe it's a other bug to report
017-01-03 20:42:01:539] info - Local watcher | File added Photos from devices/IMG_*_*.jpg
[2017-01-03 20:42:01:599] info - Synchronize | apply {"id":"Photos from devices/*.jpg","changes":[{"rev":"1-*"}],"doc":{"path":"Photos from devices/*.jpg","docType":"file","creationDate":"2015-05-23T22:50:22.000Z","lastModification":"2015-05-23T22:50:22.000Z","remote":{"_id":"FC29019E-A6FB-1FC1-87F7-*","_rev":"3-*","binary":{"_id":"10EFC452-2BF4-A0C2-99D0-*","_rev":"2-*"}},"class":"image","mime":"image/jpeg","tags":["from-sfo"],"localPath":"/home/nemo/android_storage/DCIM/Camera/*.jpg","sides":{"remote":1},"_id":"Photos from devices/*.jpg","_rev":"1-*"},"seq":1954}
[2017-01-03 20:42:01:600] info - Local writer | Put file /tmp/*.cozycloud.cc/Photos from
devices/*.jpg
[2017-01-03 20:42:01:600] info - Remote CouchDB | Download cozy/10EFC452-2BF4-A0C2-99D0-*/file
/usr/local/lib/node_modules/cozy-desktop/node_modules/progress/lib/node-progress.js:51
if ('number' != typeof options.total) throw new Error('total required');
^
Error: total required
at new ProgressBar (/usr/local/lib/node_modules/cozy-desktop/node_modules/progress/lib/node-progress.js:51:49)
at EventEmitter.<anonymous> (/usr/local/lib/node_modules/cozy-desktop/lib/bin/cli.js:76:15)
at EventEmitter.emit (events.js:95:17)
at /usr/local/lib/node_modules/cozy-desktop/lib/local/index.js:169:32
at /usr/local/lib/node_modules/cozy-desktop/lib/remote/couch.js:197:16
at ClientRequest.<anonymous> (/usr/local/lib/node_modules/cozy-desktop/node_modules/request-json-light/main.js:402:14)
at ClientRequest.g (events.js:180:16)
at ClientRequest.EventEmitter.emit (events.js:95:17)
at HTTPParser.parserOnIncomingClient [as onIncoming] (http.js:1688:21)
at HTTPParser.parserOnHeadersComplete [as onHeadersComplete] (http.js:121:23)
This last bug should have been fixed with https://github.com/cozy-labs/cozy-desktop/commit/4cbc222ec365cb81bd1ba2cb083cca9dcf8811b9
I'm wondering why I don't get the exact same generated js code with the same line numbers when building with the same coffeescript version on master...
@rzr Could it be that your built lib/
directory is not up-to-date with the latest sources on master?
What happens when you rm -rf lib/ && npm run build
, then restart the client?
Also, did you install the latest dependencies with yarn
(see https://github.com/cozy-labs/cozy-desktop/pull/483)?
Hello there,
We decided a few months ago to suspend the CLI support because maintaining both a lib, a CLI and a GUI in parallel was too much work for our team. Merging the lib with the GUI in a single package definitely made us far more productive.
We could eventually bring back the CLI at some point (some people in our team would definitely want to do so), but it will probably depend on electron, at least initially.
Closing, as we won't fix it right now. I added a note to our internal product management tool to check this issue again when the CLI is back.
Of course it's team to decide project's priorities, but as user I am voting for the need of a "minimal" CLI client or a 3rd party one, feel free to ++ my comment or give any alternative options.
I installed the cozy-desktop and I execute command "cozy-desktop add-remote-cozy https://url.of.my.cozy/ ~/cozy",it have no error,but when I run "cozy-desktop sync",It have error: root@raspberrypi:~# cozy-desktop sync Cozy-desktop v0.12.0 started (PID: 2536) [2016-05-30 05:43:40:777] info - Cozy Desktop | Run first synchronisation... [2016-05-30 05:43:40:950] info - Local watcher | Start watching filesystem for changes [2016-05-30 05:43:41:200] info - Local watcher | File added test.py [2016-05-30 05:43:41:812] info - Remote CouchDB | Getting last remote change sequence number: /usr/local/lib/node_modules/cozy-desktop/node_modules/pouchdb/lib/index.js:7928 var changeStream = stores.bySeqStore.readStream(streamOpts); ^
TypeError: Cannot read property 'readStream' of undefined at PouchDB.LevelPouch.api._changes (/usr/local/lib/node_modules/cozy-desktop/node_modules/p ouchdb/lib/index.js:7928:41) at Changes.doChanges (/usr/local/lib/node_modules/cozy-desktop/node_modules/pouchdb/lib/ind ex.js:843:28) at /usr/local/lib/node_modules/cozy-desktop/node_modules/pouchdb/lib/index.js:745:14 at TaskQueue.execute (/usr/local/lib/node_modules/cozy-desktop/node_modules/pouchdb/lib/ind ex.js:2210:7) at TaskQueue.addTask (/usr/local/lib/node_modules/cozy-desktop/node_modules/pouchdb/lib/ind ex.js:2233:10) at new Changes (/usr/local/lib/node_modules/cozy-desktop/node_modules/pouchdb/lib/index.js: 741:18) at PouchDB.AbstractPouchDB.changes (/usr/local/lib/node_modules/cozy-desktop/node_modules/p ouchdb/lib/index.js:2031:10) at Couch.getLastRemoteChangeSeq (/usr/local/lib/node_modules/cozy-desktop/lib/remote/couch. js:130:26) at Couch.getLastRemoteChangeSeq (/usr/local/lib/node_modules/cozy-desktop/lib/remote/couch. js:4:59) at RemoteWatcher.initialReplication (/usr/local/lib/node_modules/cozy-desktop/lib/remote/wa tcher.js:46:25)
what reason lead to this error? I do not know what to do!