Coder Social home page Coder Social logo

How to log in onedrive? about onedrive HOT 8 CLOSED

skilion avatar skilion commented on July 30, 2024
How to log in onedrive?

from onedrive.

Comments (8)

nerak99 avatar nerak99 commented on July 30, 2024 13

One drive is great but the msg is not clear and saying, 'do exactly what it says' is not really very friendly (and a bit patronising?).

The message does not make it clear that what is meant is to

  1. visit the url generated in the cli using your normal web browser and then,
  2. in the microsoft onedrive site, authorise the linux onedrive program to access your files.
  3. Copy and paste the url that you are dircected to on the Microsoft site to the cli and press return.

I took the message 'enter the response uri' to mean I had to 'enter' something in the cli but the bit about visiting had scrolled off the screen.

Let us raise a glass to newbies everywhere because we oldbies will not be here forever.

I hope this message will clarify the issue for future users.

from onedrive.

Scimmia22 avatar Scimmia22 commented on July 30, 2024 4

You do exactly what it says. You visit the given URL and log in, then paste the resulting URL

from onedrive.

abraunegg avatar abraunegg commented on July 30, 2024 1

@pmrancuret
Can you format your post correctly?

Also - the 'skilion' code appears to have been abandoned by the original author and contains issues that have not been fixed. If you wish to use the latest code which contains numerous fixes and enhancements you need clone from here: https://github.com/abraunegg/onedrive

Not sure if this is the problem, but my /OneDrive folder location is on an ntfs drive partition, which a Windows installation on the same machine actually already has configured as the OneDrive directory. I tried setting sync_dir="/test" in the config file (after using mkdir ~/test), hoping it would just make a separate copy for linux. Perhaps this just isn't going to work for my system?

Setting sync_dir="/test" would assume that /test is your sync dir, not ~/OneDrive/test/ which you are trying to achieve.

Having the sync dir on a Linux NTFS mount - this may cause issues as well - you 'may' end up with permission errors and the like - this is all untested.

from onedrive.

hengxin avatar hengxin commented on July 30, 2024

@Scimmia22 Fixed. Thanks.

from onedrive.

abraunegg avatar abraunegg commented on July 30, 2024

@nerak99
Thanks for the feedback on the messaging. Will look at making sure this a little clearer in the program and documentation.

Additionally, the 'skilion' code appears to have been abandoned by the original author and contains issues that have not been fixed. Any issues, suggestions & feature requests will not be looked at under this github repository.

If you wish to use the latest code which contains numerous fixes and enhancements you need clone from here: https://github.com/abraunegg/onedrive

If you have any issues when using my branch submit your issue against my branch for resolution & management.

from onedrive.

pmrancuret avatar pmrancuret commented on July 30, 2024

I've tried following these directions, but it results in a seg fault. This occurs after visiting the URL, logging in, and entering the resulting URL back into onedrive.

I used the -v option (sudo onedrive -v) , and after entering the response URL, it returns the following (please note that I've replaced the correlation_id with a bunch of X's and the trace_id with a bunch of Y's in this snippet).

onedrive.OneDriveException@src/onedrive.d(403): HTTP request returned status code 400 (Bad Request)
{
    "correlation_id": "XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX",
    "error": "invalid_grant",
    "error_codes": [
        70000
    ],
    "error_description": "AADSTS70000: The provided value for the 'code' parameter is not valid. The code has expired.\r\nTrace ID: YYYYYYYY-YYYY-YYYY-YYYY-YYYYYYYYYYYY\r\nCorrelation ID: XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX\r\nTimestamp: 2018-09-08 19:41:29Z",
    "timestamp": "2018-09-08 19:41:29Z",
    "trace_id": "YYYYYYYY-YYYY-YYYY-YYYY-YYYYYYYYYYYY"
}
----------------
0x563b921bea9c ???
	???:0
0x563b92234d22 ???
	???:0
0x563b921bd96b ???
	???:0
0x563b921bd7ff ???
	???:0
0x563b921bc136 ???
	???:0
0x563b921bbe7f ???
	???:0
0x563b921b97a7 ???
	???:0
0x563b9230d8be ???
	???:0
0x563b9230da2e ???
	???:0
0x563b9230ddea ???
	???:0
0x563b9230da2e ???
	???:0
0x563b9230dbc0 ???
	???:0
0x563b921b8ea3 ???
	???:0
0x7fbdd37f6b96 __libc_start_main
	???:0
0x563b921b0c99 ???
	???:0
0xffffffffffffffff ???
	???:0
Segmentation fault

I don't know why anything would have expired, everything was done within seconds of logging in using the supplied URL.

Not sure if this is the problem, but my ~/OneDrive folder location is on an ntfs drive partition, which a Windows installation on the same machine actually already has configured as the OneDrive directory. I tried setting sync_dir="~/test" in the config file (after using mkdir ~/test), hoping it would just make a separate copy for linux.

Thanks for any help you are able to provide! Let me know if you have other questions or need more details.

from onedrive.

pmrancuret avatar pmrancuret commented on July 30, 2024

@abraunegg Thanks for the quick response! I really appreciate it, and it's good to see you're keeping a maintained version of this cool project.

Can you format your post correctly?

I actually spent a bit of time trying to format the original post correctly and gave up. The bit of code I pasted in contained a bunch of the special markdown characters in it, so it was giving me a hard time. I'll go back and correct it now that I've had a few minutes to re-learn the markdown language.

Setting sync_dir="/test" would assume that /test is your sync dir, not ~/OneDrive/test/ which you are trying to achieve.

I actually was trying to use ~/test as the sync dir, not ~/OneDrive/test. I have my user home directory on the ntfs mount, because the partition with my Ubuntu installation is too small for all of my files, especially for the OneDrive. A Windows installation also uses that same directory for the user folder (so Windows and Ubuntu share the exact same Documents, Pictures, Music, etc. folders). So my user home directory already contains OneDrive, but it is the windows incarnation of OneDrive, and isn't interpreted as a directory by linux. So I was just trying to stay away from ~/OneDrive and use ~/test instead. When I type ls -l from my home directory, I get the following, which shows the OneDrive folder from Windows as a bunch of nonsense.

drwxrwx--- 1 root plugdev     0 Sep  8 15:31 '3D Objects'
drwxrwx--- 1 root plugdev     0 Sep  8 15:31  Contacts
drwxrwx--- 1 root plugdev     0 Sep  8 14:19  Desktop
drwxrwx--- 1 root plugdev     0 Sep  8 14:19  Documents
drwxrwx--- 1 root plugdev 32768 Sep  8 15:39  Downloads
drwxrwx--- 1 root plugdev     0 Sep  8 15:31  Favorites
drwxrwx--- 1 root plugdev     0 Sep  7 23:06  Git
drwxrwx--- 1 root plugdev     0 Sep  8 15:31  Links
drwxrwx--- 1 root plugdev     0 Sep  8 14:19  Music
d????????? ? ?    ?           ?            ?  OneDrive
drwxrwx--- 1 root plugdev     0 Sep  8 14:19  Pictures
drwxrwx--- 1 root plugdev     0 Sep  8 14:19  Public
drwxrwx--- 1 root plugdev     0 Sep  8 15:31 'Saved Games'
drwxrwx--- 1 root plugdev  4096 Sep  8 15:31  Searches
drwxrwx--- 1 root plugdev     0 Sep  8 14:19  Templates
drwxrwx--- 1 root plugdev     0 Sep  9 07:55  test
drwxrwx--- 1 root plugdev     0 Sep  8 20:19  Videos

I also need to apologize for another glaring omission in my original post. I forgot to mention that I got onedrive using apt-get install onedrive, rather than from cloning the git repo and rebuilding it myself. Typing onedrive --version yields:
onedrive v1.0.1

I did have a typo in the config file. I meant to use sync_dir="~/test" but mistyped sync_dir="/test" instead (root mount didn't have test folder, home directory did). It seems to work now that I corrected that. I was really just using the test folder to try and get something working. Now I'll set it up with something like ~/LinuxOneDrive as the sync directory, and use the other config options to only sync what I want, instead of everything.

Having the sync dir on a Linux NTFS mount - this may cause issues as well - you 'may' end up with permission errors and the like - this is all untested.

Now that I've got it working on an NTFS mount, I suppose you can consider it somewhat tested :)

Thank you again for maintaining this project, and for quickly responding to my post! Your efforts are greatly appreciated.

from onedrive.

abraunegg avatar abraunegg commented on July 30, 2024

Typing onedrive --version yields:
onedrive v1.0.1

Just be aware there are several defects with 'skilion' codebase, a few which appear to have been fixed overnight, but there are still many outstanding.

from onedrive.

Related Issues (20)

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.