coltoneshaw / 3cpm

The 3C Portfolio Manager is an essential addon to your 3Commas experience. It enables you to manage your DCA bots with greater analytics, real-time alerting, and tons of additional features.
GNU General Public License v3.0
120 stars 21 forks source link

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

Closed gabrielcr78 closed 2 years ago

gabrielcr78 commented 2 years ago

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):

JozefJarosciak commented 2 years ago

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.

coltoneshaw commented 2 years ago

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.

doharvey commented 2 years ago

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]$ 
gabrielcr78 commented 2 years ago

where do you do this? in the console tab?

doharvey commented 2 years ago

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

coltoneshaw commented 2 years ago
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

gabrielcr78 commented 2 years ago

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

image

gabrielcr78 commented 2 years ago

image

coltoneshaw commented 2 years ago

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

gabrielcr78 commented 2 years ago

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

gabrielcr78 commented 2 years ago

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!!!

mfread commented 2 years ago

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

image

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

Kevin24111 commented 2 years ago

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

hamedmirza commented 2 years ago

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 2 years ago

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

Ryan-Steelpixel commented 2 years ago

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.

coltoneshaw commented 2 years ago

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;")
JozefJarosciak commented 2 years ago

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.

mfread commented 2 years ago

Referencing Colton's post ... https://github.com/3cpm/desktop/issues/125#issuecomment-1105172480

@coltoneshaw I've tried again and am still getting the same error as I posted here https://github.com/3cpm/desktop/issues/125#issuecomment-1104705334

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

gabrielcr78 commented 2 years ago

it actually works for me on windows with the fix described

bgratt commented 2 years ago

@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
BenKPG commented 2 years ago

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

Ryan-Steelpixel commented 2 years ago

@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.

Ryan-Steelpixel commented 2 years ago

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).

Kevin24111 commented 2 years ago

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

Same problem here.

Metaflector commented 2 years ago

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...

roadie commented 2 years ago

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

JackieTreeh0rn commented 2 years ago

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
    1. 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!!!

jwiedeman commented 2 years ago

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!

mfread commented 2 years ago

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

JackieTreeh0rn commented 2 years ago

Paste commands into text editor first to make sure they aren’t getting mangled (and use the copy button instead of highlighting / copy/paste) just saying, could be related…

I also had to do it for each profile on 3CPM

On Thu, Apr 28, 2022 at 6:34 PM Mark @.***> wrote:

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

— Reply to this email directly, view it on GitHub https://github.com/3cpm/desktop/issues/125#issuecomment-1112715729, or unsubscribe https://github.com/notifications/unsubscribe-auth/AALUA77LWZMJVLX3HEAWHHLVHMHBDANCNFSM5T4SPORA . You are receiving this because you commented.Message ID: @.***>

coltoneshaw commented 2 years ago

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