coltoneshaw/3cpm

Error updating your data. Check the console for more information.

Closed this issue · 32 comments

Describe the bug
A clear and concise description of what the bug is.

To Reproduce
Steps to reproduce the behavior:

  1. try to synchronize the account by clicking on any of the Sync buttons.
  2. see the error popup saying: "Error updating your data. Check the console for more information."
    1. tried also re-adding the account... no luck

Captura de pantalla 2022-04-20 101919

Expected behavior
normally it just fetch your updated information from 3C

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: Widows 11
  • Browser: Chrome
  • Version [e.g. 22]: Version 100.0.4896.127 (Official Build) (64-bit)
    Additional context
    fetching Config
    configSlice.ts:19 setting the config
    configActions.ts:53 setting since there are no account IDs!
    3Commas.ts:32 Object
    preload.ts:14 Updating 3Commas data.
    Actions.ts:228 Error: Error invoking remote method 'api-updateData': SqliteError: table deals has no column named last_known_position_info
    syncNewProfileData @ Actions.ts:228
    3Commas.ts:32 Object
    preload.ts:14 Updating 3Commas data.
    Actions.ts:228 Error: Error invoking remote method 'api-updateData': SqliteError: table deals has no column named last_known_position_info
    syncNewProfileData @ Actions.ts:228
    3Commas.ts:32 {options: {…}}
    preload.ts:14 Updating 3Commas data.
    Actions.ts:228 Error: Error invoking remote method 'api-updateData': SqliteError: table deals has no column named last_known_position_info

I have the same problem, the application stopped working. Tried to re-create the 3c keys, but it did not help. The app no longer works. This is actually concerning because the issue is not with 3c, I confirmed that the API works as expected. I very much hope that the app does not communicate with 3C through some intermediary network that is currently down.

Hey. Sorry 3C added a profile field that's not in the database currently.

It should be open up the console with menu > view > dev tools then console.

If you scroll up you should see profileID =“” in one of the queries. If you copy that ID string and do


await window.ThreeCPM.Repository.Database.run(“thatpProfileID”, “ALTER TABLE deals ADD last_known_position_info text;”)

I'm actually away right now with only mobile, great time to have it break.

Thank you for your response.

I have try to alter table in sqlite3 instead and it worked. ;)
Here is what i did:

[dharvey@dominic-box databases]$ pwd
/home/dharvey/.config/3C Portfolio Manager/databases

[dharvey@dominic-box databases]$ sqlite3 3cdd68f7-d76d-417c-b06c-ae9df7aa1bf0.sqlite3 
SQLite version 3.34.1 2021-01-20 14:10:07
Enter ".help" for usage hints.
sqlite> ALTER TABLE deals ADD last_known_position_info text;
sqlite> .exit
[dharvey@dominic-box databases]$ 

where do you do this? in the console tab?

Sorry, i am a Linux user so i run these command in the shell.

sqllite also exist for Windows but i am not a Windows expert... sorry

await window.ThreeCPM.Repository.Database.run(await window.ThreeCPM.Repository.Config.get('all').current, “ALTER TABLE deals ADD last_known_position_info text;”)

This might be easiest. Yes on the app under the tool bar go to view > dev console > console

so i started the program,, went to the console and type that inthe bottom:

image

Can you swap out the " to in that string? It looks like maybe they copied weird. If not I can try to write up a quick function to fix it until I get home

you were rirght about the quote symbol.. changed it and now it's doing something different.
image
image

HAH!!!! i was able to pull the profiles object with this:
await window.ThreeCPM.Repository.Config.get('all')
from there copied the ProfileID and used the first command you gave us:

await window.ThreeCPM.Repository.Database.run("theProfileID", "ALTER TABLE deals ADD last_known_position_info text;")

it's working now!!

thanks a lot!!!

@gabrielcr78 I tried that and got "Uncaught SyntaxError: Invalid or unexpected token.

image

(unsure how important it is to obfuscate my Profile ID)

Hello Guys, i have also this problem with Mac OS Monterey since yesterday.

HAH!!!! i was able to pull the profiles object with this: await window.ThreeCPM.Repository.Config.get('all') from there copied the ProfileID and used the first command you gave us:

await window.ThreeCPM.Repository.Database.run("theProfileID", "ALTER TABLE deals ADD last_known_position_info text;")

it's working now!!

thanks a lot!!!

Awesome job, worked for me too. thanks

tomqw commented

After You update Your API keys there is also another error:
Actions.ts:228 Error: Error invoking remote method 'api-updateData': TypeError: Cannot read property 'updated_at' of undefined

I got same error as @mfread when trying to run the two lines that @gabrielcr78 said worked for him.

Notes: This is on Window PC, and the "Invalid or unexpected token" error shows for me after try save when adding in API keys after doing a Reset All Data.

Steps posted by Mccrystal in Discord.

  1. Open 3C Portfolio Manager
  2. In menu select "View" then "Toggle Developer Tools"
  3. Open the tab "Console" and enter:
await window.ThreeCPM.Repository.Config.get('all')
  1. Copy the profile id including quotes
  2. Don't forget to replace with what you copied in step 4 and enter:
await window.ThreeCPM.Repository.Database.run(<yourIdHere>, "ALTER TABLE deals ADD last_known_position_info text;")

await window.ThreeCPM.Repository.Database.run(, "ALTER TABLE deals ADD last_known_position_info text;")

@coltoneshaw - this worked like a charm... thank you for spelling it out for us! Much appreciated.

Referencing Colton's post ... #125 (comment)

@coltoneshaw I've tried again and am still getting the same error as I posted here #125 (comment)

I suspect it works for those on Linux but not Windows 10??

I think I'm simply going to have to wait for your update release :)

=Mark

it actually works for me on windows with the fix described

@coltoneshaw I followed the steps above, but still without success. I am now getting the following error. Thanks in advance for all your efforts!
sc1

It worked for me, thanks so much for your collaboration !

@coltoneshaw I followed the steps above, but still without success. I am now getting the following error. Thanks in advance for all your efforts! sc1

I too got that error msg when I tried to do the fix a 2nd time, and it makes sense as you have already inserted the missing table so can't do it again. If you want to try the steps again from start you will have to Reset All Data first.

it actually works for me on windows with the fix described

@gabrielcr78 Can you please confirm if it worked to apply fix when you already had a previously working profile setup, or if it worked to do these steps when trying to do create profile (which is where I'm stuck).

Error: Error invoking remote method 'api-updateData': TypeError: SQLite3 can only bind numbers, strings, bigints, buffers, and null

Same problem here.

Hi... I have gone through the process but get the following error...
Uncaught SyntaxError: Invalid or unexpected token
I have tried deleting the app and re-installing with fresh API etc...

Can you advise please...

I'm using MacOS, and after trying the 5 steps process in the Console, I'm also getting this error:
Error: Error invoking remote method 'api-updateData': TypeError: SQLite3 can only bind numbers, strings, bigints, buffers, and null

Steps posted by Mccrystal in Discord.

  1. Open 3C Portfolio Manager
  2. In menu select "View" then "Toggle Developer Tools"
  3. Open the tab "Console" and enter:
await window.ThreeCPM.Repository.Config.get('all')
  1. Copy the profile id including quotes
  2. Don't forget to replace with what you copied in step 4 and enter:
await window.ThreeCPM.Repository.Database.run(<yourIdHere>, "ALTER TABLE deals ADD last_known_position_info text;")

This worked thanks!!!

Steps posted by Mccrystal in Discord.

  1. Open 3C Portfolio Manager
  2. In menu select "View" then "Toggle Developer Tools"
  3. Open the tab "Console" and enter:
await window.ThreeCPM.Repository.Config.get('all')
  1. Copy the profile id including quotes
  2. Don't forget to replace with what you copied in step 4 and enter:
await window.ThreeCPM.Repository.Database.run(<yourIdHere>, "ALTER TABLE deals ADD last_known_position_info text;")

Worked for me!

The 5 steps works for some but not others (inc me). Awaiting 3CPM binary update from Colton.

Check out the latest release and let me know - https://github.com/3cpm/desktop/releases/tag/v2.0.2