Still cannot get Bricksync to run on my Mac

Got the correct directory sorted out, Bricksync starts to run, then the following comes up:-

INIT: Launching BrickSync
INIT: Work directory is "/Users/apple/Downloads/bricksync-osx64".
INIT: Loading configuration at "data/bricksync.conf.txt".
ERROR: Configuration variable bricklink.consumerkey is undefined.
ERROR: Configuration variable bricklink.consumersecret is undefined.
ERROR: Configuration variable bricklink.token is undefined.
ERROR: Configuration variable bricklink.tokensecret is undefined.
ERROR: Configuration variable brickowl.key is undefined.

All keys mentioned have been entered in the file, inserted keys between quotes and then tried without the quotes - to no avail.

Comments

  • 22 Comments sorted by Votes Date Added
  • Also tried restarting my Mac to make sure the save file was registered - because I'm desperate!
  • nope directory is incorrect. the data subfolder needs to be in the same directory as bricksync. I had trouble with this off the start, did you move it? I believe I needed to keep bricksync in the same place as I downloaded to work properly. or /Users is the issue because terminal can't actually find /Users, it needs the path to get to /Users. I'll take a look when I get home. I'm at work currently.

    Tyson.
  • For the first time Bricksync starts to do its stuff - surely! Coz there it is looking at the data file although unfortunately not reading the data! Also the data subfolder is in the same directory - is it not? I make no bones I am out of my depth and I know this is going to be a struggle - even after I get it running. Still wondering if manual would be better coz I dont want to get bogged down. Just learnt I will need to leave my Mac up and running 24/7 also - no great shakes but I had to know that. No one written a comprehensive guide?? Thanks for your input Tyson!
  • edited December 2019 Vote Up0Vote Down
    First of all, delete the screenshot form the internet. It is showing your BL keys :(

    Then, it looks like you are starting BrickSync in bricksync-osx64:
    INIT: Work directory is "/Users/apple/Downloads/bricksync-osx64".

    But the screenshot is showing the config in "bricksync-osx64 2", so another directory.
    Since there is a default config file in the starting folder, it will be empt for the tokens and then the error makes sense.

    So start the correct BS (in the bricksync-osx64 2 folder), or copy your config to the correct folder.
  • The correct screenshot did not show tokens - asked Brickowl help to delete screenshot shown - dont know how to myself!!
    Correct screenshot would have shown content as in my first post! - which shows the correct config file!!
  • Ok - done some tidying up. Bricksync now reads the key file - but now fails as shown on the following:-

    Last login: Tue Dec 10 20:51:21 on ttys000
    apple@AppleiMac ~ % cd downloads
    apple@AppleiMac downloads % cd bricksync-osx64
    apple@AppleiMac bricksync-osx64 % ./bricksync
    BrickSync 1.6.9 - Build Date Feb 5 2016 05:06:20
    Copyright (c) 2014-2016 Alexis Naveros
    Contact: Stragus on BrickOwl and BrickLink
    Email: [email protected]
    Coupon Donations: Stragus on BrickOwl and BrickLink
    Paypal Donations: [email protected]

    INIT: Launching BrickSync
    INIT: Work directory is "/Users/apple/Downloads/bricksync-osx64".
    INIT: Loading configuration at "data/bricksync.conf.txt".
    INIT: Configuration loaded.
    INIT: Resolving IP addresses for API and WEB services.
    INFO: No BrickSync state file found!
    INFO: We will create a new state file as "/Users/apple/Downloads/bricksync-osx64/data/bricksync.state".
    INIT: Fetching BrickOwl user information...
    INFO: Fetching the BrickLink Order List...
    BL JSON PARSER: Server replied with error code 401.
    BL JSON PARSER: Server error message : "BAD_OAUTH_REQUEST".
    BL JSON PARSER: Server error description : "TOKEN_IP_MISMATCHED: consumer: 5B4EBD3CECBB4854A1699B3517ED6030 IP: 2.29.75.36".
    JSON Parse Errors Encountered
    WARNING: BrickLink JSON Parse Error - Saving server reply (429+146 bytes) at path "data/errors-2019-12-11/00000.txt".
    WARNING: Bad reply from server, trying again shortly...
    BL JSON PARSER: Server replied with error code 401.
    BL JSON PARSER: Server error message : "BAD_OAUTH_REQUEST".
    BL JSON PARSER: Server error description : "TOKEN_IP_MISMATCHED: consumer: 5B4EBD3CECBB4854A1699B3517ED6030 IP: 2.29.75.36".
    JSON Parse Errors Encountered
    WARNING: BrickLink JSON Parse Error - Saving server reply (429+146 bytes) at path "data/errors-2019-12-11/00001.txt".
    WARNING: Bad reply from server, trying again shortly...
    ERROR: Too many connection errors, giving up.
    ERROR: Failed to fetch inventory from BrickLink.
    ERROR: Fatal error encountered.
    ERROR: Exiting now.
    Press Enter to exit...

    Any ideas - your help is really appreciated
  • The config file that was shown in the (now deleted) screenshot was in another folder than the logging in your first post.
    Can you make sure that you start BS in the same folder as the data folder that contains the filled config file?
    I have tried, and the only way I'm getting this error is when the 5 keys are left empty, hence only ""

    It the config file is not present at all, you get another error
    ERROR: Failed to read configuration file at "C:\Users\xxxxxx\Downloads\Series\bricksync-win64-171\bricksync-win64\data\bricksync.conf.txt".
  • Other folder & files are deleted and trash emptied.
    Ran again and above copy comes up identical. Appears to contact server(s) then (extract from above:- BL JSON PARSER: Server error description : "TOKEN_IP_MISMATCHED: consumer: 5B4EBD3CECBB4854A1699B3517ED6030 IP: 2.29.75.36".
    That last consumer key and IP address is mine and . Should it be?

    In passing - I've asked Bricklink's advice on the security of keeping same keys etc
  • My naiveity perhaps, Baskrie but are you spending time on this for fun? (just wanting to know how this all works :-))
  • I don't get paid (as far as I know) for my time spent in the forum and sometimes helping people.
    So yes, it's for fun and the joy that someone can get things done when helped.

    The IP shown is BL's IP as far as I know, but the token you must use for Bricklink is (or can) bound to the IP setting you set.
    So check your current IP and see if that matches the one on the BL API page. If not add a new access token with the correct IP and use that tokenvalue and tokensecret in the BS config.
  • Sorry I didn't get back to this, my wife was sick once I got home and then I had hockey tickets. It looks like you are in good hands, I would have guided the exact same way.

    Tyson.
  • Need to understand as well as achieve connectivity between Bricklink, Brickowl and it appears, my computer (Mac) coz I think I am going to need it to be able to control the data when things get out of the ordinary. So can I go back to Bricklink API settings. In passing, the above IP address is mine whilst I am connected to broadband thro my home router via EE (in UK- I see you are Dutch Baskrie- really good English I would never have known!). It also appears that I have got to be careful with this as I also use a mobile router thro a different provider Vodafone) because EE is not very reliable - so need to keep an eye on who I am connected through, making sure it is always EE and the same IP address. Cont'd...
  • Bricklink API settings (the box with the settings)
    Top section 'User Info - no problems although it might be a good idea for me to change the secret (presumably this is no more significant than a simple password - why a different name I don't know) The consumer key is probably useless without it so should be ok to mention it in the forum if required.
    Next section 'Call back URL' - what is this for as it is currently blank - should there be something there?
    Next Section 'Access Token' - what is an Access Token? presumably something to do with connectivity between Bricklink and Brickowl servers (either between each other of from my end and my IP address. Then Token Value presumably one of the servers Identity with Token secret being again the password for that device?? - and allowed IP being it's address - it is entered as 91.110.123.191?? Mask IP?? - entered as 255.255.255.255?? I notice the delete button here??
    Next Final Section - 'Add Access Token' IP address - this has not been filled in?? - and the Mask IP is also 255.255.255.255
    Am I out of order here Baskrie? Asking this stuff?
  • To round things off, the help pages for Bricklink API come up with (incredibly in the Getting Started section) the following:- (gobbledygook as far as I am concerned)
    Obtain Access Tokens

    "After registering static IP addresses of your endpoint client, you can then access tokens. One (1) access token and one (1) token secret will be issued per IP address.
    BrickLink resources are accessible only from the registered location."

    What on earth is an "endpoint client" - It is no doubt related to the above Bricklink API settings. In the meantime I will Google it to see if itcomes up with anything useful.

    Bit like getting a prescription from your local GP your not meant to understand it coz it's 'magic'! All I can say is pity the poor 'Lego builder"
  • Seller and store name should be your correct BL names :)
    ConsumerKey is a key given by BL, I think it's static
    ConsumerSecret this is the 'password' can be changed by pressing the renew key, it's correlated to your consumerkey
    Call back URL, forget about it :), it can be empty, it is important in some cases, but don't know, mine is blank too

    Access token is the 'password' part but correlated to your IP address. So when your IP changes, this changes to (you have to do it by hand), or it won't work.
    91.110.123.191 should be your IP, go to https://www.myip.com/ to check your IP.
    255.255.255.255 is correct, I will not get in to details, but in this case it means that only exactly the stated IP can use the token.
    But since you use 2 connections, this can be tricky. You can cure this by using 0.0.0.0 for both the IP and mask (you should first press delete, and then enter the zeros in the add section after which you press ADD). Now your keys and tokens can be used from any address, so I could use them from over here in the Netherlands :)
    Not the biggest problem, but make sure you change the ConsumerSecret :)

    An this is used to connect Bricklink to your MAC (BrickSync) which can connect to BrickOwl. There is no direct connection between BL and BO.

    Endpoint client is in fact your MAC (in your case), but it's a bit of an obsolete term. Best to forget it :)

    Thank you for the kind words, I'm doing my best.

    In short.
    Delete the current access token, make a new one with only zeros.
    renew consumer key
    Get all new keys in the config file
    restart Bircksync
  • Many thanks BasKrie - I have made changes and will light the ignition proably later tonight. In the time being going for a quick pint of beer, and I will raise the glass to you! I'll let you know how I get on. Speak later.... I'll mention you to my friend from Rotterdam Erik Dijkshoorn who now lives close buy!
  • Close by. Please forgive my English!!
  • I put the zeros IP address in and it came back with "BL JSON PARSER: Server error description : "TOKEN_IP_MISMATCHED: consumer: 5B4EBD3CECBB4854A1699B3517ED6030 IP: 2.26.97.64"." This is now my IP address!! It has changed although still thro EE (my broadband supplier)!! However this shouldn't matter whilst using 0.0.0.0 should it!!
  • You should be able to connect from any IP when your allowed IP and mask IP are both 0.0.0.0. Maybe a stupid question, but you did update the new keys in your Bricksync config file and save it?
  • Sorted BasKrie! Forgot to change the mask IP to zeros as well! Te zeros seems a good solution bearing in mind the situation with ISPs these days - at least here in UK. By the way I think Boris Johnson is a dangerous man and how people can be taken in by the cheating and the lies on behalf of very rich people. Please forgive the rant - it is our voting day, but I suspect the worse - I hope not! The European Union is not perfect by any means but.... compared to the alternative - its a no brainer!

    Sorry!

    Yes Brick sync is now running for which I am very grateful to you - just a bit overwhelmed by the amount of learning that appears to be required. And on a store that is barely 2 months old! Any pointers at what I should know or look at first, in fact any advice at all, or where to look (any youtube videos?) to familiarise myself at the greatest speed....

    I am really glad we took the Bricklink API settings page route and you cleared away the unnecessary verbosity in their API manual!

    PS what is BasKrie and what is your name or do you prefer to stay anonymous?

    Best Wishes Geoff
  • One tip, make sure to run blmaster on blmaster off when adding new lots (I would add on BL).

    Bricksync help was a huge guide on the things you can accomplish. Be aware you can screw up your whole inventory with the wrong command.

    Tyson.
  • Hello Geoff,
    Glad things worked out with BrickSync.
    As Tyson said, when adding inventory via Bricklink (or changing anything in said inventory) make sure you do a blmaster on and blmaster off in BS right after that.

    You can do lot more via BS, but that's for later :)

    Allthough the Netherlands isn't a big country, Rotterdam is still 220 km from Assen (bit more than 2 hour drive).

    As to what you should do next, there are many things. First of all there is a book about selling Lego, It's called "Insider Secrets to Funding Your LEGO Hobby: How to sell LEGO, make money, and always be happy!"
    I haven't bought or read it, but what I heard it's a good place to start.

    The best advice I can give you, have fun running the store, don't be disapointed when things don't go as quick as you want, have patience and last don't freak out on the first problem you encounter with an order, just stay calm and deal with it the best you can.

    Regards,
    Bas (yes that's my real first name, the rest isn't that interesting :))
Sign In or Register to comment.