Coder Social home page Coder Social logo

onedrive's People

Contributors

aleksen avatar astanin avatar hgdsraj avatar jlcs-es avatar jonathonma avatar junpeianzai avatar lanhin avatar mgor avatar nishantvarma avatar scimmia22 avatar skilion avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

onedrive's Issues

MonitorException in src/monitor.d(72): inotify_add_watch failed (No space left on device)

The program fails to start

$ ./onedrive  -m
monitor.MonitorException@src/monitor.d(72): inotify_add_watch failed (No space left on device)
----------------
src/monitor.d:13 void monitor.Monitor.add(immutable(char)[]) [0x655009]
src/monitor.d:60 void monitor.Monitor.addRecursive(immutable(char)[]) [0x654eb6]
src/monitor.d:63 void monitor.Monitor.addRecursive(immutable(char)[]) [0x654f28]
src/monitor.d:63 void monitor.Monitor.addRecursive(immutable(char)[]) [0x654f28]
src/monitor.d:63 void monitor.Monitor.addRecursive(immutable(char)[]) [0x654f28]
src/monitor.d:63 void monitor.Monitor.addRecursive(immutable(char)[]) [0x654f28]
src/monitor.d:48 void monitor.Monitor.init(config.Config, bool) [0x654dc2]
src/main.d:125 _Dmain [0x6535b5]
??:? _D2rt6dmain211_d_run_mainUiPPaPUAAaZiZ6runAllMFZ9__lambda1MFZv [0x66b4e2]
??:? void rt.dmain2._d_run_main(int, char**, extern (C) int function(char[][])*).tryExec(scope void delegate()) [0x66b420]
??:? void rt.dmain2._d_run_main(int, char**, extern (C) int function(char[][])*).runAll() [0x66b49e]
??:? void rt.dmain2._d_run_main(int, char**, extern (C) int function(char[][])*).tryExec(scope void delegate()) [0x66b420]
??:? _d_run_main [0x66b37d]
??:? main [0x654bff]
??:? __libc_start_main [0xc0a4fec4]

Notably, there is enough space on the device where the OneDrive folder is located:

$ df -h ~/OneDrive/
Filesystem                                              Size  Used Avail Use% Mounted on
/dev/disk/by-uuid/d1ae20d4-1cb0-4adc-bc84-064e61cd528b  676G   76G  567G  12% /

The resource which is exhausted is the number of maximum number of inotify watches per user.

To read this number:

$ sysctl fs.inotify.max_user_watches
fs.inotify.max_user_watches = 8192

To increase it:

$ sudo sysctl fs.inotify.max_user_watches=16384
fs.inotify.max_user_watches = 16384

Monitoring seems to be working after that.

It might be a good idea to give a more detailed error message to the user and suggest how to change his system settings.

Does not sync files starting with period.

Any file or folder starting with a period does not sync.

According to the Notes section of the README, it says that the Windows naming convention is followed. According to the linked document about the Windows naming convention:

it is acceptable to specify a period as the first character of a name

Not sure if this is a bug or just an oversight.

Let me know if I can help. Thanks for the hard work so far.

Crash when creating reqursive directories

Great tool, thank you :-)

My version was built from the latest github sources on the 30/11-2015.

I have seen the client crash three times while trying to create the local directory "./Pictures/Camera Roll"

It seems that multiple attempts to create the directory is made after whict the client exits or crashes.
From my log:
Creating directory: ./Pictures/Camera Roll
./Pictures/Camera Roll: No such file or directory
Creating directory: ./Pictures/Camera Roll
./Pictures/Camera Roll: No such file or directory
Creating directory: ./Pictures/Camera Roll

I think the problem is that the "Pictures" wasn't present and then the mkdir fails. I created the "Pictures" dir manually and the problem went away.

So it seems that when creating a new dir it is neccessary to check that all parent dirs also exists and create them if they do not.

Error while syncing after some time waiting

Everytime i start the program with root#"onedrive -v -m" and then this error shows up after some time passes http://pastebin.com/3higrhaU
I ran it again without the -m option and there is this error http://pastebin.com/1VBFXACk
I ran it another time without any options and there is this log http://pastebin.com/96UYNhMX
I also saw couple of errors when i scroll up like this one
"HTTP request returned status code 412 (Precondition Failed)"
I am using Puppy Linux 6.0.2 32bit

session cannot handle status code 416 (Requested Range Not Satisfiable)

While uploading a file onedrive crashed (didn't get a coredump, but will try to next time). When restarting it, it tried to resume the upload with an apparently wrong fragment. Restarting it once more worked, though. The uploaded file is valid, i.e. its md5sum matches. Version is 9da9b72.

Here's the complete log:

./onedrive -v
(…)
Uploading fragment: 1226833920-1237319680/1660093275
Uploading fragment: 1237319680-1247805440/1660093275
Uploading fragment: 1247805440-1258291200/1660093275
[1]    31901 broken pipe  ./onedrive -v
./onedrive -v
Loading config ...
Initializing the OneDrive API ...
Opening the item database ...
All operations will be performed in: /home/stefan/OneDrive
Initializing the Synchronization Engine ...
Trying to restore the upload session ...
Continuing the upload session ...
Uploading fragment: 1256191552-1266677312/1660093275
onedrive.OneDriveException@src/onedrive.d(282): HTTP request returned status code 416 (Requested Range Not Satisfiable)
----------------
./onedrive(std.json.JSONValue onedrive.OneDriveApi.uploadFragment(const(char)[], immutable(char)[], long, long, long)+0x56a) [0x5ac12a]
./onedrive(std.json.JSONValue upload.UploadSession.upload()+0x180) [0x5b9be0]
./onedrive(_Dmain+0x8cf) [0x5a5adf]
./onedrive(_D2rt6dmain211_d_run_mainUiPPaPUAAaZiZ6runAllMFZ9__lambda1MFZv+0x1f) [0x5c0c27]
./onedrive(void rt.dmain2._d_run_main(int, char**, extern (C) int function(char[][])*).tryExec(scope void delegate())+0x2a) [0x5c0b82]
./onedrive(void rt.dmain2._d_run_main(int, char**, extern (C) int function(char[][])*).runAll()+0x2b) [0x5c0be3]
./onedrive(void rt.dmain2._d_run_main(int, char**, extern (C) int function(char[][])*).tryExec(scope void delegate())+0x2a) [0x5c0b82]
./onedrive(_d_run_main+0x1d2) [0x5c0b02]
./onedrive(main+0x12) [0x5a7a1a]
/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf5) [0x7f6c06d85b45]
[1]    2790 exit 1     ./onedrive -v
./onedrive -v
Loading config ...
Initializing the OneDrive API ...
Opening the item database ...
All operations will be performed in: /home/stefan/OneDrive
Initializing the Synchronization Engine ...
Trying to restore the upload session ...
Continuing the upload session ...
Uploading fragment: 1258291200-1268776960/1660093275
Uploading fragment: 1268776960-1279262720/1660093275
(…)

OneDrive not skipping directory

When run, the program is trying to download my entire OneDrive library, though in my config file I have it set to skip my music folder. In my config file I have:

skip_dir = "./Music/"

I have also tried some other variations but all have failed. I apologize if this is an error on my part. If so, it would be appreciated if you could direct me. Thank you for your time.

Build error on ArchLinux

I've got the following error when building 1.0 from AUR:

dmd -O -release -inline -boundscheck=off -ofonedrive -L-lcurl -L-lsqlite3 -L-ldl patch/etc_c_curl.d patch/std_net_curl.d src/config.d src/itemdb.d src/main.d src/monitor.d src/onedrive.d src/sqlite.d src/sync.d src/util.d
/usr/bin/ld: onedrive.o: relocation R_X86_64_32 against `_D17TypeInfo_xHAyaAya6__initZ' can not be used when making a shared object; recompile with -fPIC
onedrive.o: error adding symbols: Bad value
collect2: error: ld returned 1 exit status
--- errorlevel 1
Makefile:19: recipe for target 'onedrive' failed

Shared directory are not synced

I have a few shared directory with some colleagues, they are not synced by your program except if I'm the one that created them. It seems that this is a (huge) limitation of the API ...

Otherwise this program works perfectly!

Yours,

Erwan

SQLlite Database is locked

Hello,
I ran into the following error whilst trying to sync for the first time. I have so far reproduced it three times with 100% repo rate.

I am running OneNote as a local user simply by launching the onennote binary from the terminal. Note that I am able to download around 5 or so files before I see the error.

Perhaps somewhere during the sync, a connection in the DB is being left open?

Below is a copy of my config file

sync_dir = "/OneDrive"
skip_file = "._|
_"
skip_dir = ".*"

And here is the error


Downloading: ./Family Memories/2016 - General/20160313_101913_Richtone(HDR).jpg
sqlite.SqliteException@src/sqlite.d(126): database is locked
----------------
??:? ref sqlite.Statement.Result sqlite.Statement.Result.__ctor(etc.c.sqlite3.sqlite3_stmt*) [0x598059]
??:? sqlite.Statement.Result sqlite.Statement.exec() [0x598405]
??:? void itemdb.ItemDatabase.insert(const(char)[], const(char)[], itemdb.ItemType, const(char)[], const(char)[], const(char)[], const(char)[], const(char)[]) [0x57ecf6]
??:? void sync.SyncEngine.applyDifference(std.json.JSONValue) [0x599c66]
??:? void sync.SyncEngine.applyDifferences() [0x598c51]
??:? void main.performSync(sync.SyncEngine) [0x58aa8b]
??:? _Dmain [0x58a1f7]
??:? _D2rt6dmain211_d_run_mainUiPPaPUAAaZiZ6runAllMFZ9__lambda1MFZv [0x5a521e]
??:? void rt.dmain2._d_run_main(int, char**, extern (C) int function(char[][])*).tryExec(scope void delegate()) [0x5a5168]
??:? void rt.dmain2._d_run_main(int, char**, extern (C) int function(char[][])*).runAll() [0x5a51da]
??:? void rt.dmain2._d_run_main(int, char**, extern (C) int function(char[][])*).tryExec(scope void delegate()) [0x5a5168]
??:? _d_run_main [0x5a50d9]
??:? main [0x58c6f5]
??:? __libc_start_main [0x55a9882f]

403 Forbidden when downloading a zip file that I can access online just fine

Hi,
I just moved my data from Copy.com to OneDrive, and I'm on Linux. I use your onedrive tool to sync.
The sync has been doing fine, but now it found an old saved game file from "And Yet It Moves" which is a zip file called ghost.gst. The OneDrive online interface actually asks my confirmation about zips being able to contain viruses before it allows me to download it. Perhaps this software needs to do something special for files like this to be allowed to download them?

The error I got is below:

Timeout was reached on handle 262BEF0
Downloading: ./CopyBackup/Personal/game-saves/Broken Rules/And Yet It Moves/ghosts/loaded/ghost.gst
HTTP request returned status code 403 (Forbidden)
Downloading: ./CopyBackup/Personal/game-saves/Broken Rules/And Yet It Moves/ghosts/loaded/ghost.gst

sync.SyncException@src/sync.d(106): HTTP request returned status code 403 (Forbidden)

??:? void sync.SyncEngine.applyDifferences() [0x5cc437]
??:? void main.performSync(sync.SyncEngine) [0x5be16f]
??:? _Dmain [0x5bda12]
??:? D2rt6dmain211_d_run_mainUiPPaPUAAaZiZ6runAllMFZ9__lambda1MFZv [0x5d908a]
??:? void rt.dmain2.d_run_main(int, char**, extern (C) int function(char[][])*).tryExec(scope void delegate()) [0x5d8fc8]
??:? void rt.dmain2.d_run_main(int, char**, extern (C) int function(char[][])).runAll() [0x5d9046]
??:? void rt.dmain2.d_run_main(int, char
, extern (C) int function(char[][])
).tryExec(scope void delegate()) [0x5d8fc8]
??:? _d_run_main [0x5d8f25]
??:? main [0x5bfe6d]
??:? __libc_start_main [0x2d664b44]

onedrive.OneDriveException@src/onedrive.d(337): HTTP request returned status code 403 (Forbidden)

??:? void onedrive.OneDriveApi.checkHttpCode() [0x5c5420]
??:? void onedrive.OneDriveApi.download(const(char)[], immutable(char)[]) [0x5c474c]
??:? void onedrive.OneDriveApi.downloadById(const(char)[], immutable(char)[]) [0x5c24b4]
??:? void sync.SyncEngine.applyNewItem(itemdb.Item, immutable(char)[]) [0x5cd619]
??:? void sync.SyncEngine.applyDifference(std.json.JSONValue) [0x5cd150]
??:? void sync.SyncEngine.applyDifferences() [0x5cc2b9]
??:? void main.performSync(sync.SyncEngine) [0x5be16f]
??:? _Dmain [0x5bda12]
??:? D2rt6dmain211_d_run_mainUiPPaPUAAaZiZ6runAllMFZ9__lambda1MFZv [0x5d908a]
??:? void rt.dmain2.d_run_main(int, char**, extern (C) int function(char[][])*).tryExec(scope void delegate()) [0x5d8fc8]
??:? void rt.dmain2.d_run_main(int, char**, extern (C) int function(char[][])).runAll() [0x5d9046]
??:? void rt.dmain2.d_run_main(int, char
, extern (C) int function(char[][])
).tryExec(scope void delegate()) [0x5d8fc8]
??:? _d_run_main [0x5d8f25]
??:? main [0x5bfe6d]
??:? __libc_start_main [0x2d664b44]

AssertError in src/itemdb.d(188)

This error happens when there is a local folder with files, and there is a remote folder with the same name but no files. IIRC, the remote folder was moved through the web interface to another location.

$ ./onedrive
core.exception.AssertError@src/itemdb.d(188): Assertion failure
----------------
??:? _d_assert [0x666647]
??:? void itemdb.__assert(int) [0x652d4f]
src/itemdb.d:188 bool itemdb.ItemDatabase.selectByPath(const(char)[], out itemdb.Item) [0x652530]
src/sync.d:447 void sync.SyncEngine.uploadNewItems(immutable(char)[]) [0x6616c2]
src/sync.d:452 void sync.SyncEngine.uploadNewItems(immutable(char)[]) [0x66174d]
src/sync.d:452 void sync.SyncEngine.uploadNewItems(immutable(char)[]) [0x66174d]
src/sync.d:346 void sync.SyncEngine.scanForDifferences(immutable(char)[]) [0x660d63]
src/main.d:154 void main.performSync(sync.SyncEngine) [0x653a07]
src/main.d:88 _Dmain [0x65350a]
??:? _D2rt6dmain211_d_run_mainUiPPaPUAAaZiZ6runAllMFZ9__lambda1MFZv [0x66b4e2]
??:? void rt.dmain2._d_run_main(int, char**, extern (C) int function(char[][])*).tryExec(scope void delegate()) [0x66b420]
??:? void rt.dmain2._d_run_main(int, char**, extern (C) int function(char[][])*).runAll() [0x66b49e]
??:? void rt.dmain2._d_run_main(int, char**, extern (C) int function(char[][])*).tryExec(scope void delegate()) [0x66b420]
??:? _d_run_main [0x66b37d]
??:? main [0x654bff]
??:? __libc_start_main [0x61cccec4]

Invalid UTF-8 sequence at index one

I am seeing the following error when trying to run the program directly from the command line.

Let me know if you need extra info.

std.utf.UTFException@/usr/include/dmd/phobos/std/utf.d(1219): Invalid UTF-8 sequence (at index 1)
----------------
??:? pure dchar std.utf.decodeImpl!(true, 0, const(immutable(char)[])).decodeImpl(ref const(immutable(char)[]), ref ulong) [0x593a65]
??:? pure @trusted dchar std.utf.decode!(0, const(immutable(char)[])).decode(ref const(immutable(char)[]), ref ulong) [0x5939e0]
??:? @safe immutable(char)[] std.file.readText!(immutable(char)[], immutable(char)[]).readText(immutable(char)[]) [0x5748ac]
??:? _Dmain [0x58a10d]
??:? _D2rt6dmain211_d_run_mainUiPPaPUAAaZiZ6runAllMFZ9__lambda1MFZv [0x5a521e]
??:? void rt.dmain2._d_run_main(int, char**, extern (C) int function(char[][])*).tryExec(scope void delegate()) [0x5a5168]
??:? void rt.dmain2._d_run_main(int, char**, extern (C) int function(char[][])*).runAll() [0x5a51da]
??:? void rt.dmain2._d_run_main(int, char**, extern (C) int function(char[][])*).tryExec(scope void delegate()) [0x5a5168]
??:? _d_run_main [0x5a50d9]
??:? main [0x58c6f5]
??:? __libc_start_main [0xb964f82f]
Segmentation fault (core dumped)

onedrive authentication broken link...

Hi,

Yesterday a tried your first release but I got an error in the first run... When authenticating program shows a broken link, there is a blank space aproximately in the middle of the link making the authentication not possible. I tried an "&" for this blank space but microsoft did not indicated me any url link to provide to onedrive.

Thanks,

Alberto.

JSON Key not found: name

Anytime I exec onedrive, even with --resync, it fails in the middle of synchronization.
With verbose it shows that for many directories and files works right, but then this appears:

std.json.JSONException@std/json.d(442): Key not found: name
----------------
??:? pure @safe void std.exception.bailOut!(std.json.JSONException).bailOut(immutable(char)[], ulong, const(char[])) [0x6391e6]
??:? pure @safe inout(std.json.JSONValue)* std.exception.enforce!(std.json.JSONException, inout(std.json.JSONValue)*).enforce(inout(std.json.JSONValue)*, lazy const(char)[], immutable(char)[], ulong) [0x63924a]
??:? std.json.JSONValue.opIndexinout(pure ref inout(std.json.JSONValue) function(immutable(char)[])) [0x60ac5a]
??:? void sync.SyncEngine.applyDifference(std.json.JSONValue) [0x5dd963]
??:? void sync.SyncEngine.applyDifferences() [0x5dd6f1]
??:? void main.performSync(sync.SyncEngine) [0x5cf5a7]
??:? _Dmain [0x5cee4a]
??:? _D2rt6dmain211_d_run_mainUiPPaPUAAaZiZ6runAllMFZ9__lambda1MFZv [0x5ea50a]
??:? void rt.dmain2._d_run_main(int, char**, extern (C) int function(char[][])*).tryExec(scope void delegate()) [0x5ea448]
??:? void rt.dmain2._d_run_main(int, char**, extern (C) int function(char[][])*).runAll() [0x5ea4c6]
??:? void rt.dmain2._d_run_main(int, char**, extern (C) int function(char[][])*).tryExec(scope void delegate()) [0x5ea448]
??:? _d_run_main [0x5ea3a5]
??:? main [0x5d12a5]
??:? __libc_start_main [0x1b789b04]

Issue installing as service Ubuntu 15.10 64b

Getting this issue
Failed to get D-Bus connection: No such file or directory

After attempting to run:
systemctl --user enable onedrive
systemctl --user start onedrive

Nothing in log:
journalctl --user-unit onedrive -f

Only way I can get it to run is cmd line: onedrive --resync

How can I install it as a service?

cant install

Install al dependencies but make dosen't work.
Ubuntu 14.04.4

make dmd -O -release -inline -boundscheck=off -ofonedrive -L-lcurl -L-lsqlite3 -L-ldl patch/etc_c_curl.d patch/std_net_curl.d src/config.d src/itemdb.d src/main.d src/monitor.d src/onedrive.d src/sqlite.d src/sync.d src/upload.d src/util.d /usr/bin/ld: cannot find -lcurl /usr/bin/ld: cannot find -lsqlite3 collect2: error: ld returned 1 exit status --- errorlevel 1 make: *** [onedrive] Fehler 1

Authorisation issue

Hi

On first run I get problems with authorisation. First off, I needed to change the authorization url from:
&redirect_url=https://
to
&redirect_uri=https://
(changing l to i as per https://dev.onedrive.com/auth/msa_oauth.htm as referenced in the readme)

That allows me to authorize but when I enter the response url in the terminal I get:

onedrive.OneDriveException@src/onedrive.d(337): HTTP request returned status code 400 (Bad Request)
----------------
??:? void onedrive.OneDriveApi.checkHttpCode() [0x5b69e8]
??:? std.json.JSONValue onedrive.OneDriveApi.post!(char).post(const(char)[], const(char)[]) [0x5b9349]
??:? void onedrive.OneDriveApi.acquireToken(const(char)[]) [0x5b52cd]
??:? void onedrive.OneDriveApi.authorize() [0x5b32b9]
??:? _Dmain [0x5aef5b]
??:? _D2rt6dmain211_d_run_mainUiPPaPUAAaZiZ6runAllMFZ9__lambda1MFZv [0x5caa06]
??:? void rt.dmain2._d_run_main(int, char**, extern (C) int function(char[][])*).tryExec(scope void delegate()) [0x5ca95c]
??:? void rt.dmain2._d_run_main(int, char**, extern (C) int function(char[][])*).runAll() [0x5ca9c2]
??:? void rt.dmain2._d_run_main(int, char**, extern (C) int function(char[][])*).tryExec(scope void delegate()) [0x5ca95c]
??:? _d_run_main [0x5ca8b9]
??:? main [0x5b1545]
??:? __libc_start_main [0xe1c9aa3f]

I'm using two factor authorisation, which responds OK. I have also tried using a specific app password to bypass two factor authorisation and I get the same response.

Any help appreciated.

Error on uploading large file

Onedrive storage was empty. The app tried to upload a large file (more than 1 Gb)

Uploading fragment: 1635778560-1646264320/1660687078
Uploading fragment: 1646264320-1656750080/1660687078
Uploading fragment: 1656750080-1660687078/1660687078
sqlite.SqliteException@src/sqlite.d(126): FOREIGN KEY constraint failed
----------------
??:? void sqlite.Statement.Result.step() [0x5bd34e]
??:? void itemdb.ItemDatabase.upsert(const(char)[], const(char)[], itemdb.ItemType, const(char)[], const(char)[], const(char)[], const(char)[], const(char)[]) [0x5ad4f7]
??:? void sync.SyncEngine.saveItem(std.json.JSONValue) [0x5c280e]
??:? _Dmain [0x5af6b6]
??:? _D2rt6dmain211_d_run_mainUiPPaPUAAaZiZ6runAllMFZ9__lambda1MFZv [0x5caef6]
??:? void rt.dmain2._d_run_main(int, char**, extern (C) int function(char[][])*).tryExec(scope void delegate()) [0x5cae4c]
??:? void rt.dmain2._d_run_main(int, char**, extern (C) int function(char[][])*).runAll() [0x5caeb2]
??:? void rt.dmain2._d_run_main(int, char**, extern (C) int function(char[][])*).tryExec(scope void delegate()) [0x5cae4c]
??:? _d_run_main [0x5cada9]
??:? main [0x5b1a65]
??:? __libc_start_main [0x1784a60f]

core dumped

$ make
dmd -O -release -inline -boundscheck=off -ofonedrive -L-lcurl -L-lsqlite3 -L-ldl patch/etc_c_curl.d patch/std_net_curl.d src/config.d src/itemdb.d src/main.d src/monitor.d src/onedrive.d src/sqlite.d src/sync.d src/util.d
$ ls
INSTALL.md  LICENSE  Makefile  onedrive  onedrive.conf  onedrive.o  patch  README.md  src
$ ./onedrive 
Ошибка сегментирования (core dumped)

How to log in onedrive?

The Doc reads

The first time you run the program you will be asked to sign in. The procedure requires a web browser.

I run this app by ./onedrive and get the following information:

Authorize this app visiting:

https://login.live.com/oauth20_authorize.srf?client_id=000000004C15842F&scope=wl.offline_access%20onedrive.readwrite&response_type=code&redirect_uri=https://login.live.com/oauth20_desktop.srf

Enter the response uri: <CURSOR>

What should I enter here (entering id and password for my onedrive account does not work)? How to log in onedrive?

I have tried to change both client_id and client_secret in ~/.config/onedrive/config, however, it does not work either.

out of sync - renames local more recent file and replaces with remote

EEFFEFC3B64745EA!160937 classnotes.txt
The local item has a different modified time 2016-Apr-14 07:57:16 remote is 2016-Apr-07 21:43:51Z
The local item has a different hash
The local item is out of sync, renaming ...
Downloading: ./work/classnotes.txt

should instead upload more recent version, perhaps back up remote one. could be download remote and rename. then upload both

Filling up syslog

I installed onedrive yesterday and today I realised that syslog.1 is filled with Enter the response uri: up to 33 GB.

I supposed this will only occur once as it's for the setup, and I can solve it by removing the log. But I think it shouldn't be there at first place.

Trying to install on Ubuntu 16.04

I am trying to install on Ubuntu 16.04 and when I run make I get this error:

~/onedrive $ make dmd -O -release -inline -boundscheck=off -ofonedrive -L-lcurl -L-lsqlite3 -L-ldl src/config.d src/itemdb.d src/main.d src/monitor.d src/onedrive.d src/sqlite.d src/sync.d src/upload.d src/util.d /usr/bin/ld: cannot find -lcurl collect2: error: ld returned 1 exit status --- errorlevel 1 Makefile:18: recipe for target 'onedrive' failed make: *** [onedrive] Error 1
I have curl installed. What am I missing?

When I try to install libcurl3 I get this:

sudo apt-get install libcurl3 Reading package lists... Done Building dependency tree Reading state information... Done libcurl3 is already the newest version (7.47.0-1ubuntu2)

Thank you

upload fragment fails on en dashes (maybe other unicode chars?)

This issue only occurs when uploading big files with the fragment uploader. Small files work just fine. It appears OneDrive has different responses depending on the endpoint? I'll capture the output of a small file upload in a second for comparison.

steps to reproduce:

# the dashes are en dashes, i.e. U+2013
echo "asd" > "lets test en dashes – small file.txt"
dd if=/dev/zero of="lets test en dashes – big file.txt" count=20481
onedrive

Stacktrace:

std.json.JSONException@std/json.d(1168): Illegal control character. (Line 1:488)
----------------
./onedrive(immutable(char)[] std.json.parseJSON!(ubyte[]).parseJSON(ubyte[], int, std.json.JSONOptions).parseString()+0x40e) [0x5b358e]
./onedrive(void std.json.parseJSON!(ubyte[]).parseJSON(ubyte[], int, std.json.JSONOptions).parseValue(std.json.JSONValue*)+0x304) [0x5b39f4]
./onedrive(void std.json.parseJSON!(ubyte[]).parseJSON(ubyte[], int, std.json.JSONOptions).parseValue(std.json.JSONValue*)+0x1d9) [0x5b38c9]
./onedrive(std.json.JSONValue std.json.parseJSON!(ubyte[]).parseJSON(ubyte[], int, std.json.JSONOptions)+0xa0) [0x5b2fe0]
./onedrive(std.json.JSONValue onedrive.OneDriveApi.uploadFragment(const(char)[], immutable(char)[], long, long, long)+0x64c) [0x5ae21c]
./onedrive(std.json.JSONValue upload.UploadSession.upload()+0x180) [0x5bbde8]
./onedrive(void sync.SyncEngine.uploadNewItems(immutable(char)[])+0x724) [0x5ba494]
./onedrive(void sync.SyncEngine.uploadNewItems(immutable(char)[])+0x41c) [0x5ba18c]
./onedrive(void sync.SyncEngine.scanForDifferences(immutable(char)[])+0xbf) [0x5b8cef]
./onedrive(void main.performSync(sync.SyncEngine)+0x3c) [0x5a8104]
./onedrive(_Dmain+0x8fe) [0x5a7b1e]
./onedrive(_D2rt6dmain211_d_run_mainUiPPaPUAAaZiZ6runAllMFZ9__lambda1MFZv+0x1f) [0x5c2e2f]
./onedrive(void rt.dmain2._d_run_main(int, char**, extern (C) int function(char[][])*).tryExec(scope void delegate())+0x2a) [0x5c2d8a]
./onedrive(void rt.dmain2._d_run_main(int, char**, extern (C) int function(char[][])*).runAll()+0x2b) [0x5c2deb]
./onedrive(void rt.dmain2._d_run_main(int, char**, extern (C) int function(char[][])*).tryExec(scope void delegate())+0x2a) [0x5c2d8a]
./onedrive(_d_run_main+0x1d2) [0x5c2d0a]
./onedrive(main+0x12) [0x5a9a2a]
/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf5) [0x7f52f584db45]

JSON returned by the endpoint:

{"createdBy":{"application":{"displayName":"OneDrive Free Client","id":"4c15842f"},"user":{"id":"f566c0629b1c____"}},"createdDateTime":"2015-10-04T11:32:36.093+00:00","cTag":"aYzpGNTY2QzA2MjlCMUM1QzY2ITUwMC4yNTc","eTag":"aRjU2NkMwNjI5QjFDNUM2NiE1MDAuMA","id":"F566C0629B1C5C66!500","lastModifiedBy":{"application":{"displayName":"OneDrive Free Client","id":"4c15842f"},"user":{"id":"f566c0629b1c____"}},"lastModifiedDateTime":"2015-10-04T11:32:36.093+00:00","name":"lets test en dashes – big file.txt","parentReference":{"driveId":"f566c0629b1c____","id":"F566C0629B1C5C66!101","path":"/drive/root:"},"size":10486272,"webUrl":"https://onedrive.live.com/redir?resid=F566C0629B1C5C66!500","file":{"hashes":{"crc32Hash":"3EF91C45","sha1Hash":"7B01A542EB5E7092826594CC5136FC805BB36247"},"mimeType":"text/plain"},"fileSystemInfo":{"createdDateTime":"2015-10-04T11:32:36.093+00:00","lastModifiedDateTime":"2015-10-04T11:32:36.093+00:00"}}

The char 488 referred above is the en dash in the name field.

Authorization page not found

I can almost get the program to run. I get to the part where I open the link to authorize the program to access my onedrive. The link I am given to click is:

https://login.live.com/oauth20_authorize.srf?client_id=000000004C15842F&scope=wl.offline_access%20onedrive.readwrite&response_type=code&redirect_url=https://login.live.com/oauth20_desktop.srf

and when I click that link I get this:

Firefox can't find the server at bd504287-a598-4f00-a88d-8028e217e2de.apps.dev.live.com.

Crashes with Precondition Failed errors

I ran ondrive with -v -m switches and these are what shown on console during the crashes

Uploading: ./Pictures/Camera Roll/WP_20150914_003.jpg
sync.SyncException@src/sync.d(344): HTTP request returned status code 412 (Precondition Failed)
----------------
onedrive(void main.performSync(sync.SyncEngine)+0x2f) [0x81bf187]
onedrive(_Dmain+0x8a0) [0x81beb50]
onedrive(_D2rt6dmain211_d_run_mainUiPPaPUAAaZiZ6runAllMFZ9__lambda1MFZv+0x12) [0x81d2822]
onedrive(void rt.dmain2._d_run_main(int, char**, extern (C) int function(char[][])*).tryExec(scope void delegate())+0x18) [0x81d2790]
onedrive(void rt.dmain2._d_run_main(int, char**, extern (C) int function(char[][])*).runAll()+0x27) [0x81d27e7]
onedrive(void rt.dmain2._d_run_main(int, char**, extern (C) int function(char[][])*).tryExec(scope void delegate())+0x18) [0x81d2790]
onedrive(_d_run_main+0x166) [0x81d2726]
onedrive(main+0x14) [0x81c0564]
/lib/i386-linux-gnu/libc.so.6(__libc_start_main+0xde) [0xb745e72e]
onedrive.OneDriveException@src/onedrive.d(327): HTTP request returned status code 412 (Precondition Failed)
----------------
onedrive(std.json.JSONValue onedrive.OneDriveApi.patch!(char).patch(const(char)[], const(char)[])+0xee) [0x81c5726]
onedrive(void sync.SyncEngine.uploadNewFile(immutable(char)[])+0x479) [0x81cb9e9]
onedrive(void sync.SyncEngine.uploadNewItems(immutable(char)[])+0x510) [0x81cb398]
onedrive(void sync.SyncEngine.uploadNewItems(immutable(char)[])+0x3dd) [0x81cb265]
onedrive(void sync.SyncEngine.uploadNewItems(immutable(char)[])+0x3dd) [0x81cb265]
onedrive(void sync.SyncEngine.uploadNewItems(immutable(char)[])+0x3dd) [0x81cb265]
onedrive(void sync.SyncEngine.scanForDifferences(immutable(char)[])+0x7e) [0x81ca186]
onedrive(void main.performSync(sync.SyncEngine)+0x2f) [0x81bf187]
onedrive(_Dmain+0x8a0) [0x81beb50]
onedrive(_D2rt6dmain211_d_run_mainUiPPaPUAAaZiZ6runAllMFZ9__lambda1MFZv+0x12) [0x81d2822]
onedrive(void rt.dmain2._d_run_main(int, char**, extern (C) int function(char[][])*).tryExec(scope void delegate())+0x18) [0x81d2790]
onedrive(void rt.dmain2._d_run_main(int, char**, extern (C) int function(char[][])*).runAll()+0x27) [0x81d27e7]
onedrive(void rt.dmain2._d_run_main(int, char**, extern (C) int function(char[][])*).tryExec(scope void delegate())+0x18) [0x81d2790]
onedrive(_d_run_main+0x166) [0x81d2726]
onedrive(main+0x14) [0x81c0564]
/lib/i386-linux-gnu/libc.so.6(__libc_start_main+0xde) [0xb745e72e]


Uploading: ./Pictures/Camera Roll/WP_20150504_003.jpg
sync.SyncException@src/sync.d(344): HTTP request returned status code 412 (Precondition Failed)
----------------
onedrive(void main.performSync(sync.SyncEngine)+0x2f) [0x81bf187]
onedrive(_Dmain+0x8a0) [0x81beb50]
onedrive(_D2rt6dmain211_d_run_mainUiPPaPUAAaZiZ6runAllMFZ9__lambda1MFZv+0x12) [0x81d2822]
onedrive(void rt.dmain2._d_run_main(int, char**, extern (C) int function(char[][])*).tryExec(scope void delegate())+0x18) [0x81d2790]
onedrive(void rt.dmain2._d_run_main(int, char**, extern (C) int function(char[][])*).runAll()+0x27) [0x81d27e7]
onedrive(void rt.dmain2._d_run_main(int, char**, extern (C) int function(char[][])*).tryExec(scope void delegate())+0x18) [0x81d2790]
onedrive(_d_run_main+0x166) [0x81d2726]
onedrive(main+0x14) [0x81c0564]
/lib/i386-linux-gnu/libc.so.6(__libc_start_main+0xde) [0xb74fb72e]
onedrive.OneDriveException@src/onedrive.d(327): HTTP request returned status code 412 (Precondition Failed)
----------------
onedrive(std.json.JSONValue onedrive.OneDriveApi.patch!(char).patch(const(char)[], const(char)[])+0xee) [0x81c5726]
onedrive(void sync.SyncEngine.uploadNewFile(immutable(char)[])+0x479) [0x81cb9e9]
onedrive(void sync.SyncEngine.uploadNewItems(immutable(char)[])+0x510) [0x81cb398]
onedrive(void sync.SyncEngine.uploadNewItems(immutable(char)[])+0x3dd) [0x81cb265]
onedrive(void sync.SyncEngine.uploadNewItems(immutable(char)[])+0x3dd) [0x81cb265]
onedrive(void sync.SyncEngine.uploadNewItems(immutable(char)[])+0x3dd) [0x81cb265]
onedrive(void sync.SyncEngine.scanForDifferences(immutable(char)[])+0x7e) [0x81ca186]
onedrive(void main.performSync(sync.SyncEngine)+0x2f) [0x81bf187]
onedrive(_Dmain+0x8a0) [0x81beb50]
onedrive(_D2rt6dmain211_d_run_mainUiPPaPUAAaZiZ6runAllMFZ9__lambda1MFZv+0x12) [0x81d2822]
onedrive(void rt.dmain2._d_run_main(int, char**, extern (C) int function(char[][])*).tryExec(scope void delegate())+0x18) [0x81d2790]
onedrive(void rt.dmain2._d_run_main(int, char**, extern (C) int function(char[][])*).runAll()+0x27) [0x81d27e7]
onedrive(void rt.dmain2._d_run_main(int, char**, extern (C) int function(char[][])*).tryExec(scope void delegate())+0x18) [0x81d2790]
onedrive(_d_run_main+0x166) [0x81d2726]
onedrive(main+0x14) [0x81c0564]
/lib/i386-linux-gnu/libc.so.6(__libc_start_main+0xde) [0xb74fb72e]

HTTP request returned status code 500 (Internal Server Error)

Hello, I have problem when running onedrive. Everytime I run onedrive, it's return internal server error code. Here are the result:
HTTP request returned status code 500 (Internal Server Error)
HTTP request returned status code 500 (Internal Server Error)

sync.SyncException@src/sync.d(106): HTTP request returned status code 500 (Internal Server Error)

??:? void sync.SyncEngine.applyDifferences() [0x5cbe1f]
??:? void main.performSync(sync.SyncEngine) [0x5bdc1f]
??:? _Dmain [0x5bd4c2]
??:? D2rt6dmain211_d_run_mainUiPPaPUAAaZiZ6runAllMFZ9__lambda1MFZv [0x5d8a9a]
??:? void rt.dmain2.d_run_main(int, char**, extern (C) int function(char[][])*).tryExec(scope void delegate()) [0x5d89d8]
??:? void rt.dmain2.d_run_main(int, char**, extern (C) int function(char[][])).runAll() [0x5d8a56]
??:? void rt.dmain2.d_run_main(int, char
, extern (C) int function(char[][])
).tryExec(scope void delegate()) [0x5d89d8]
??:? _d_run_main [0x5d8935]
??:? main [0x5bf91d]
??:? __libc_start_main [0x59221a3f]

onedrive.OneDriveException@src/onedrive.d(337): HTTP request returned status code 500 (Internal Server Error)

??:? void onedrive.OneDriveApi.checkHttpCode() [0x5c4e08]
??:? std.json.JSONValue onedrive.OneDriveApi.get(const(char)[]) [0x5c3b40]
??:? void sync.SyncEngine.applyDifferences() [0x5cbbf8]
??:? void main.performSync(sync.SyncEngine) [0x5bdc1f]
??:? _Dmain [0x5bd4c2]
??:? D2rt6dmain211_d_run_mainUiPPaPUAAaZiZ6runAllMFZ9__lambda1MFZv [0x5d8a9a]
??:? void rt.dmain2.d_run_main(int, char**, extern (C) int function(char[][])*).tryExec(scope void delegate()) [0x5d89d8]
??:? void rt.dmain2.d_run_main(int, char**, extern (C) int function(char[][])).runAll() [0x5d8a56]
??:? void rt.dmain2.d_run_main(int, char
, extern (C) int function(char[][])
).tryExec(scope void delegate()) [0x5d89d8]
??:? _d_run_main [0x5d8935]
??:? main [0x5bf91d]
??:? __libc_start_main [0x59221a3f]`

Update:
When I run: onedrive -v --resync, I notice that the HTML error code 500 will be returned at a particular folder, every single time.

Thanks in advance.

Crash on Sync, error HTTP 412

Hi,
I'm having an issue where the synchronisation would crash randomly with an error 412. It might be my connection problem, if it's the case it would be good to have an auto retry mechanism in case of http error so I can leave onedrive run in the background until it's really done.

Internet in my country is having some issues recently so it might be related, the cable from Singapore to US is broken and will be fixed at the end of the month so connections to US are very unstable.

Here's the crash log
`Uploading: ./Pictures/htpc/2009-05 France/IMG_0055 copy.JPG

sync.SyncException@src/sync.d(352): HTTP request returned status code 412 (Precondition Failed)

??:? void sync.SyncEngine.scanForDifferences(immutable(char)[]) [0x5cd919]
??:? void main.performSync(sync.SyncEngine) [0x5bdc82]
??:? _Dmain [0x5bd512]
??:? D2rt6dmain211_d_run_mainUiPPaPUAAaZiZ6runAllMFZ9__lambda1MFZv [0x5d8bda]
??:? void rt.dmain2.d_run_main(int, char**, extern (C) int function(char[][])*).tryExec(scope void delegate()) [0x5d8b18]
??:? void rt.dmain2.d_run_main(int, char**, extern (C) int function(char[][])).runAll() [0x5d8b96]
??:? void rt.dmain2.d_run_main(int, char
, extern (C) int function(char[][])
).tryExec(scope void delegate()) [0x5d8b18]
??:? _d_run_main [0x5d8a75]
??:? main [0x5bf96d]
??:? __libc_start_main [0xb397ea3f]

onedrive.OneDriveException@src/onedrive.d(337): HTTP request returned status code 412 (Precondition Failed)

??:? void onedrive.OneDriveApi.checkHttpCode() [0x5c4f20]
??:? std.json.JSONValue onedrive.OneDriveApi.patch!(char).patch(const(char)[], const(char)[]) [0x5c75ab]
??:? void sync.SyncEngine.uploadLastModifiedTime(const(char)[], const(char)[], std.datetime.SysTime) [0x5d0561]
??:? void sync.SyncEngine.uploadNewFile(immutable(char)[]) [0x5cfde0]
??:? void sync.SyncEngine.uploadNewItems(immutable(char)[]) [0x5cf2bc]
??:? void sync.SyncEngine.uploadNewItems(immutable(char)[]) [0x5cf0da]
??:? void sync.SyncEngine.uploadNewItems(immutable(char)[]) [0x5cf0da]
??:? void sync.SyncEngine.uploadNewItems(immutable(char)[]) [0x5cf0da]
??:? void sync.SyncEngine.uploadNewItems(immutable(char)[]) [0x5cf0da]
??:? void sync.SyncEngine.scanForDifferences(immutable(char)[]) [0x5cd818]
??:? void main.performSync(sync.SyncEngine) [0x5bdc82]
??:? _Dmain [0x5bd512]
??:? D2rt6dmain211_d_run_mainUiPPaPUAAaZiZ6runAllMFZ9__lambda1MFZv [0x5d8bda]
??:? void rt.dmain2.d_run_main(int, char**, extern (C) int function(char[][])*).tryExec(scope void delegate()) [0x5d8b18]
??:? void rt.dmain2.d_run_main(int, char**, extern (C) int function(char[][])).runAll() [0x5d8b96]
??:? void rt.dmain2.d_run_main(int, char
, extern (C) int function(char[][])
).tryExec(scope void delegate()) [0x5d8b18]
??:? _d_run_main [0x5d8a75]
??:? main [0x5bf96d]
??:? __libc_start_main [0xb397ea3f]`

Tray icon and status/configuration using a GUI

Hi there,

First of all, sorry if this is not the place to post a feature request/idea. I tried to find one. Failed at that, but thought this would be a nice place, if people want to contribute.

I really, really like your client. It has worked very well (except for one or two errors). The only thing that's kinda missing is a GUI for it, both for configuration and as status indicator. A simples GUI for the former and a tray icon for the latter (much like it is in Windows, or Dropbox for Linux) would make it friendlier to the user and simpler to know what's happening just by glancing at the system tray.

Do you think it's doable? I don't know D or how to build a GUI using it.

onedrive seg faults from missing OneDrive folder

onedrive, once launched, doesn't check if the OneDrive folder is there nor creates it if it's missing, and immediately segfaults. Installing onedrive also doesn't create the OneDrive folder if it isn't there.

Have some version notation

Hello,

It would be nice to have a version notation or a revision number listed in README. It would be easier for me to know if I am running an outdated build.

Regards

Crash on sync

This morning I started getting this error message when I run onedrive -m
Does anyone know what I can do to fix this?

Today is Thu Jan 21 @ 07:47:44 ~ $ onedrive -m

std.json.JSONException@std/json.d(443): Key not found: cTag

??:? pure @safe void std.exception.bailOut!(std.json.JSONException).bailOut(immutable(char)[], ulong, const(char[])) [0x6134c2]
??:? pure @safe inout(std.json.JSONValue)* std.exception.enforce!(std.json.JSONException, inout(std.json.JSONValue)).enforce(inout(std.json.JSONValue), lazy const(char)[], immutable(char)[], ulong) [0x613526]
??:? std.json.JSONValue.opIndexinout(pure ref inout(std.json.JSONValue) function(immutable(char)[])) [0x5e6fce]
??:? void sync.SyncEngine.applyDifference(std.json.JSONValue) [0x5be4fe]
??:? void sync.SyncEngine.applyDifferences() [0x5bd8d1]
??:? void main.performSync(sync.SyncEngine) [0x5af867]
??:? _Dmain [0x5af18a]
??:? D2rt6dmain211_d_run_mainUiPPaPUAAaZiZ6runAllMFZ9__lambda1MFZv [0x5ca9fe]
??:? void rt.dmain2.d_run_main(int, char**, extern (C) int function(char[][])*).tryExec(scope void delegate()) [0x5ca954]
??:? void rt.dmain2.d_run_main(int, char**, extern (C) int function(char[][])).runAll() [0x5ca9ba]
??:? void rt.dmain2.d_run_main(int, char
, extern (C) int function(char[][])
).tryExec(scope void delegate()) [0x5ca954]
??:? _d_run_main [0x5ca8b1]
??:? main [0x5b153d]
??:? __libc_start_main [0xf436cec4]

Cannot install Ubuntu 15.10

Trying to install and getting errors during make

❯ make                                                             
dmd -O -release -inline -boundscheck=off -ofonedrive -L-lcurl -L-lsqlite3 -L-ldl patch/etc_c_curl.d patch/std_net_curl.d src/config.d src/itemdb.d src/main.d src/monitor.d src/onedrive.d src/sqlite.d src/sync.d src/upload.d src/util.d
/usr/bin/ld: cannot find -lcurl
collect2: error: ld returned 1 exit status
--- errorlevel 1
Makefile:20: recipe for target 'onedrive' failed
make: *** [onedrive] Error 1

Crash on Sync: Unnexpected character '<'

No special chars in the file names. Files are all smaller ZIP files.

``

std.json.JSONException@std/json.d(1194): Unexpected character '<'. (Line 1:1)

??:? void std.json.parseJSON!(char[]).parseJSON(char[], int, std.json.JSONOptions).parseValue(std.json.JSONValue_) [0x5c8b73]
??:? std.json.JSONValue std.json.parseJSON!(char[]).parseJSON(char[], int, std.json.JSONOptions) [0x5c7c9b]
??:? std.json.JSONValue onedrive.OneDriveApi.perform() [0x5c4d59]
??:? std.json.JSONValue onedrive.OneDriveApi.perform(const(void)[]) [0x5c4a7b]
??:? std.json.JSONValue onedrive.OneDriveApi.patch!(char).patch(const(char)[], const(char)[]) [0x5c759a]
??:? void sync.SyncEngine.uploadLastModifiedTime(const(char)[], const(char)[], std.datetime.SysTime) [0x5d0559]
??:? void sync.SyncEngine.uploadNewFile(immutable(char)[]) [0x5cfdd8]
??:? void sync.SyncEngine.uploadNewItems(immutable(char)[]) [0x5cf2b4]
??:? void sync.SyncEngine.uploadNewItems(immutable(char)[]) [0x5cf0d2]
??:? void sync.SyncEngine.uploadNewItems(immutable(char)[]) [0x5cf0d2]
??:? void sync.SyncEngine.uploadNewItems(immutable(char)[]) [0x5cf0d2]
??:? void sync.SyncEngine.scanForDifferences(immutable(char)[]) [0x5cd810]
??:? void main.performSync(sync.SyncEngine) [0x5bdc7a]
??:? Dmain [0x5bd50a]
??:? D2rt6dmain211_d_run_mainUiPPaPUAAaZiZ6runAllMFZ9__lambda1MFZv [0x5d8bca]
??:? void rt.dmain2.d_run_main(int, char
, extern (C) int function(char[][])
).tryExec(scope void delegate()) [0x5d8b08]
??:? void rt.dmain2._d_run_main(int, char**, extern (C) int function(char[][])).runAll() [0x5d8b86]
??:? void rt.dmain2._d_run_main(int, char**, extern (C) int function(char[][])
).tryExec(scope void delegate()) [0x5d8b08]
??:? _d_run_main [0x5d8a65]
??:? main [0x5bf965]
??:? __libc_start_main [0xa19c6ec4]
``

Question about running as a service

Forgive my slowness to comprehend what may be clear to everyone else.
I am running Ubuntu 14.04 64 bit. I installed OneDrive using make and sudo make install.
Things are now working fine as long as I run onedrive -m when I logon to the computer and keep a terminal open.

I see that to run onedrive as a service I am supposed to enable and start the systemd service:
systemctl --user enable onedrive
systemctl --user start onedrive

When I type systemctl --user enable onedrive in the terminal I get a message that the command is not found. When I check Synaptic I see that systemd-services is installed.

What am I missing and how can I fix this?

Thank you

GG

onedrive daemon service failed

Terminal ouput:
[user@localhost ~]$ systemctl --user enable onedrive
Failed to execute operation: No such file or directory

this seems like a simple fix, I will look at helping if I can find time.

Install on Raspberry Pi 3

Hello,

I tried to install OneDrive on Ubuntu Mate 16.04 on a Raspberry Pi 3, but the DMD compiler is not compatible with armhf architecture.

So I tried to use GDC instead of DMD but I have some unreconized command line options with GDC :

  • unreconized command line option '-release'
  • unreconized command line option '-inline'
  • unreconized command line option '-boundscheck=off'

Any Idea ?

Thank you very mutch !

HTTP request returned status code 400 (Bad Request) on uploading files

The program is just exiting now, any tip?

04:06:14 witchfinder systemd[558]: Started OneDrive Free Client.
May 05 04:06:17 witchfinder onedrive[27224]: Uploading: ./Ideas/"Save Me" App..desktop
May 05 04:06:18 witchfinder onedrive[27224]: HTTP request returned status code 400 (Bad Request)
May 05 04:06:18 witchfinder onedrive[27224]: Uploading: ./Ideas/"Save Me" App..desktop
May 05 04:06:19 witchfinder onedrive[27224]: HTTP request returned status code 400 (Bad Request)
May 05 04:06:19 witchfinder onedrive[27224]: Uploading: ./Ideas/"Save Me" App..desktop
May 05 04:06:19 witchfinder onedrive[27224]: sync.SyncException@src/sync.d(352): HTTP request returned status code 400 (Bad Request)
May 05 04:06:19 witchfinder onedrive[27224]: ----------------
May 05 04:06:19 witchfinder onedrive[27224]: ??:? void sync.SyncEngine.scanForDifferences(immutable(char)[]) [0x5cdd0c]
May 05 04:06:19 witchfinder onedrive[27224]: ??:? void main.performSync(sync.SyncEngine) [0x5bdece]
May 05 04:06:19 witchfinder onedrive[27224]: ??:? _Dmain [0x5bd6a7]
May 05 04:06:19 witchfinder onedrive[27224]: ??:? _D2rt6dmain211_d_run_mainUiPPaPUAAaZiZ6runAllMFZ9__lambda1MFZv [0x5d8bde]
May 05 04:06:19 witchfinder onedrive[27224]: ??:? void rt.dmain2._d_run_main(int, char**, extern (C) int function(char[][])*).tryExec(scope void delegate()) [0x5d8b28]
May 05 04:06:19 witchfinder onedrive[27224]: ??:? void rt.dmain2._d_run_main(int, char**, extern (C) int function(char[][])*).runAll() [0x5d8b9a]
May 05 04:06:19 witchfinder onedrive[27224]: ??:? void rt.dmain2._d_run_main(int, char**, extern (C) int function(char[][])*).tryExec(scope void delegate()) [0x5d8b28]
May 05 04:06:19 witchfinder onedrive[27224]: ??:? _d_run_main [0x5d8a99]
May 05 04:06:19 witchfinder onedrive[27224]: ??:? main [0x5bfb25]
May 05 04:06:19 witchfinder onedrive[27224]: ??:? __libc_start_main [0x9dfce70f]
May 05 04:06:19 witchfinder onedrive[27224]: onedrive.OneDriveException@src/onedrive.d(337): HTTP request returned status code 400 (Bad Request)
May 05 04:06:19 witchfinder onedrive[27224]: ----------------
May 05 04:06:19 witchfinder onedrive[27224]: ??:? std.json.JSONValue onedrive.OneDriveApi.upload(immutable(char)[], immutable(char)[]) [0x5c47e7]
May 05 04:06:19 witchfinder onedrive[27224]: ??:? void sync.SyncEngine.uploadNewFile(immutable(char)[]) [0x5cfea5]
May 05 04:06:19 witchfinder onedrive[27224]: ??:? void sync.SyncEngine.uploadNewItems(immutable(char)[]) [0x5cf8f6]
May 05 04:06:19 witchfinder onedrive[27224]: ??:? void sync.SyncEngine.uploadNewItems(immutable(char)[]) [0x5cf72f]
May 05 04:06:19 witchfinder onedrive[27224]: ??:? void sync.SyncEngine.uploadNewItems(immutable(char)[]) [0x5cf72f]
May 05 04:06:19 witchfinder onedrive[27224]: ??:? void sync.SyncEngine.scanForDifferences(immutable(char)[]) [0x5cdc0b]
May 05 04:06:19 witchfinder onedrive[27224]: ??:? void main.performSync(sync.SyncEngine) [0x5bdece]
May 05 04:06:19 witchfinder onedrive[27224]: ??:? _Dmain [0x5bd6a7]
May 05 04:06:20 witchfinder systemd[558]: onedrive.service: Main process exited, code=exited, status=1/FAILURE
May 05 04:06:20 witchfinder systemd[558]: onedrive.service: Unit entered failed state.
May 05 04:06:20 witchfinder systemd[558]: onedrive.service: Failed with result 'exit-code'.

HTTP request returned status code 400 (Bad Request)

When running onedrive for the first time, I get the following error. I'm using the onedrive package from the AUR in Archlinux.

[lifestronaut@pepper ~]$ onedrive

std.net.curl.CurlException@patch/std_net_curl.d(1006): HTTP request returned status code 400 (Bad Request)

??:? pure @safe bool std.exception.enforce!(std.net.curl.CurlException, bool).enforce(bool, lazy const(char)[], immutable(char)[], ulong) [0x57e452]
??:? char[] std.net.curl._basicHTTP!(char)._basicHTTP(const(char)[], const(void)[], std.net.curl.HTTP) [0x5bc812]
??:? char[] std.net.curl.post!(char, char).post(const(char)[], const(char)[], std.net.curl.HTTP) [0x5bdbdc]
??:? void onedrive.OneDriveApi.acquireToken(const(char)[]) [0x5cb4c2]
??:? _Dmain [0x5c4b67]
??:? D2rt6dmain211_d_run_mainUiPPaPUAAaZiZ6runAllMFZ9__lambda1MFZv [0x5df826]
??:? void rt.dmain2.d_run_main(int, char**, extern (C) int function(char[][])*).tryExec(scope void delegate()) [0x5df764]
??:? void rt.dmain2.d_run_main(int, char**, extern (C) int function(char[][])).runAll() [0x5df7e2]
??:? void rt.dmain2.d_run_main(int, char
, extern (C) int function(char[][])
).tryExec(scope void delegate()) [0x5df764]
??:? _d_run_main [0x5df6c1]
??:? main [0x5c71d5]
??:? __libc_start_main [0x75b6970f]

x86_64-suse-linux/bin/ld: cannot find -lphobos2

Behaviour:

> make
dmd -O -release -inline -boundscheck=off -ofonedrive -L-lcurl -L-lsqlite3 -L-ldl patch/etc_c_curl.d patch/std_net_curl.d src/config.d src/itemdb.d src/main.d src/monitor.d src/onedrive.d src/sqlite.d src/sync.d src/upload.d src/util.d
/usr/lib64/gcc/x86_64-suse-linux/4.8/../../../../x86_64-suse-linux/bin/ld: cannot find -lphobos2
collect2: error: ld returned 1 exit status
--- errorlevel 1
Makefile:20: recipe for target 'onedrive' failed
make: *** [onedrive] Error 1

What I did check:

Check1: libphobos is mentioned in DFLAGS and the paths exists

$ cat /etc/dmd.conf
[Environment64]
DFLAGS=-I/usr/include/dlang/dmd-2.069.2/phobos -I/usr/include/dlang/dmd-2.069.2/druntime -L-L/usr/lib64 -L--export-dynamic

Check2: the .so files exists and in the right place:

$ ls /usr/lib64/*phobos*
/usr/lib64/libphobos2-ldc-debug.so.2.0.67  /usr/lib64/libphobos2-ldc.so.67  /usr/lib64/libphobos2.so.0.69.2
/usr/lib64/libphobos2-ldc-debug.so.67      /usr/lib64/libphobos2.so
/usr/lib64/libphobos2-ldc.so.2.0.67        /usr/lib64/libphobos2.so.0.69

Check3: changed Makefile from

DFLAGS = -ofonedrive -L-lcurl -L-lsqlite3 -L-ldl

to:

DFLAGS = -v -ofonedrive -L-lcurl -L-lsqlite3 -L-ldl

Run make again to observe that the linker commandline is:

gcc onedrive.o -o onedrive -m64 -lcurl -lsqlite3 -ldl -L/usr/lib64 -Xlinker --export-dynamic -Xlinker -Bstatic -lphobos2 -Xlinker -Bdynamic -lpthread -lm -lrt -ldl

This is to confirm that -L/usr/lib64 is used in linker.

Any hint? Strange enough, there was no error about not finding -lcurl or -lsqlite3, but curl/sqlite3 libraries are in /usr/lib64 just like -lphobos2

One Drive For Business Support?

I appreciate that the README says it's not possible - but I'd really like that functionality. Is there anything I can help with in order to make it work?

Failure when not syncing photos

When I try to avoid syncing my "Pictures" folder then I get the following crash:

std.json.JSONException@std/json.d(443): Key not found: cTag

??:? pure @safe void std.exception.bailOut!(std.json.JSONException).bailOut(immutable(char)[], ulong, const(char[])) [0x629e7a]
??:? pure @safe inout(std.json.JSONValue)* std.exception.enforce!(std.json.JSONException, inout(std.json.JSONValue)).enforce(inout(std.json.JSONValue), lazy const(char)[], immutable(char)[], ulong) [0x629ede]
??:? std.json.JSONValue.opIndexinout(pure ref inout(std.json.JSONValue) function(immutable(char)[])) [0x5fc22a]
??:? void sync.SyncEngine.applyDifference(std.json.JSONValue) [0x5cfc2e]
??:? void sync.SyncEngine.applyDifferences() [0x5cf001]
??:? void main.performSync(sync.SyncEngine) [0x5c0f97]
??:? _Dmain [0x5c08ba]
??:? D2rt6dmain211_d_run_mainUiPPaPUAAaZiZ6runAllMFZ9__lambda1MFZv [0x5dc12e]
??:? void rt.dmain2.d_run_main(int, char**, extern (C) int function(char[][])*).tryExec(scope void delegate()) [0x5dc084]
??:? void rt.dmain2.d_run_main(int, char**, extern (C) int function(char[][])).runAll() [0x5dc0ea]
??:? void rt.dmain2.d_run_main(int, char
, extern (C) int function(char[][])
).tryExec(scope void delegate()) [0x5dc084]
??:? _d_run_main [0x5dbfe1]
??:? main [0x5c2c6d]
??:? __libc_start_main [0xee656b04]

Even if I rename the folder, this happens. My conf is now:

sync_dir = "/OneDrive"
skip_file = "._|
_"
skip_dir = ".*|Videos|Music|Pictures-old"

Failure when receiving data from the peer on handle

After running onedrive with -v switch got the following output:

Downloading: ./Literature/Программирование/Разное/Khorstman_K_-_Scala_Dlya_Neterpelivykh_-_2013.pdf
std.net.curl.CurlException@patch/std_net_curl.d(4037): Failure when receiving data from the peer on handle 2197E10
----------------
??:? pure @safe bool std.exception.enforce!(std.net.curl.CurlException, bool).enforce(bool, lazy const(char)[], immutable(char)[], ulong) [0x56bb5a]
??:? void std.net.curl.Curl._check(int) [0x584c12]
??:? int std.net.curl.HTTP.perform(std.typecons.Flag!("throwOnError").Flag) [0x5802df]
??:? void onedrive.OneDriveApi.download(const(char)[], immutable(char)[]) [0x5b5d70]
??:? void onedrive.OneDriveApi.downloadById(const(char)[], immutable(char)[]) [0x5b3ae4]
??:? void sync.SyncEngine.applyNewItem(itemdb.Item, immutable(char)[]) [0x5bebc1]
??:? void sync.SyncEngine.applyDifference(std.json.JSONValue) [0x5be6f6]
??:? void sync.SyncEngine.applyDifferences() [0x5bd8b1]
??:? void main.performSync(sync.SyncEngine) [0x5af7d7]
??:? _Dmain [0x5af10f]
??:? _D2rt6dmain211_d_run_mainUiPPaPUAAaZiZ6runAllMFZ9__lambda1MFZv [0x5ca93e]
??:? void rt.dmain2._d_run_main(int, char**, extern (C) int function(char[][])*).tryExec(scope void delegate()) [0x5ca894]
??:? void rt.dmain2._d_run_main(int, char**, extern (C) int function(char[][])*).runAll() [0x5ca8fa]
??:? void rt.dmain2._d_run_main(int, char**, extern (C) int function(char[][])*).tryExec(scope void delegate()) [0x5ca894]
??:? _d_run_main [0x5ca7f1]
??:? main [0x5b14ad]
??:? __libc_start_main [0x5552ec4]

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.