Skip to content
This repository has been archived by the owner on Dec 11, 2019. It is now read-only.

Brave crash when I try to open csv from payment history #4433

Closed
bitcoinuser opened this issue Oct 2, 2016 · 14 comments
Closed

Brave crash when I try to open csv from payment history #4433

bitcoinuser opened this issue Oct 2, 2016 · 14 comments

Comments

@bitcoinuser
Copy link

  • Platform (Win7, 8, 10? macOS? Linux distro?):

Ubuntu

  • Brave Version:

Dev Channel Beta 0.12.3dev-RC5

@alexwykoff
Copy link
Contributor

Brave 0.12.3 RC5 on Ubuntu 16.04 latest pass. All systems appear to be functioning properly for wallet creation and ledger.

ubuntu_brave_wallet

Testing the CSV will mean forcing a reconciliation IIRC. To do so, edit ~/.config/brave/ledger-state.json and change the "reconcileStamp" value to a very small number (like 0).

This does mean MONEY WILL LEAVE YOUR WALLET.

@diracdeltas might have another suggestion for a means of mocking the creation of payment data so that you can check the frontend without it costing real money.

@willy-b
Copy link
Contributor

willy-b commented Oct 2, 2016

@alexwykoff, FYI, as long as wallet creation is working, you can also point your client at testnet to test all the features that require reconciliation (including CSV) without spending real money which is what I have been doing recently: #4286 (comment)

@willy-b
Copy link
Contributor

willy-b commented Oct 2, 2016

Hey @bitcoinuser, I unfortunately can't reproduce this. I was able to test the full Payment History flow on the latest build, but didn't get any crash or error.

Would you feel comfortable sharing any of your ledger data files? E.g.~/.config/brave-test/ledger*.json.
You can email to willy@entropi.info if you like or post somewhere public and link.

WARNING: if you have any remaining bitcoin balance in that session you should OMIT persona.wallet.keychain from ledger-state.json

@bitcoinuser
Copy link
Author

Hi,

Strange. I'm not reproducing the problem anymore.

2016-10-02 19:49 GMT-03:00 Willy Bruns notifications@github.com:

Hey @bitcoinuser https://github.com/bitcoinuser, I unfortunately can't
reproduce this. I was able to test the full Payment History flow on the
latest build, but didn't get any crash or error.

Would you feel comfortable sharing any of your ledger data files? E.g.
~/.config/brave-test/ledger*.json.
You can email to willy@entropi.info if you like or post somewhere public
and link. WARNING: if you have any remaining bitcoin balance you should
OMIT persona.wallet.keychain from ledger-state.json


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
#4433 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/ABH86P7DgRtwQNp65qvfL7HBQ7Yr3lCmks5qwDUWgaJpZM4KL568
.

@willy-b
Copy link
Contributor

willy-b commented Oct 2, 2016

Now I'm really looking forward to writing automated tests for this stuff :-)

@lattice0
Copy link

lattice0 commented Oct 3, 2016

Same here, Debian 8

@willy-b
Copy link
Contributor

willy-b commented Oct 3, 2016

Hey @LucasZanella!

A couple of questions:
Does the crash occur when you open the Payments History modal?
Or is it actually clicking the CSV link that crashes Brave?

I ask because the CSV link is just a <a> element with a data URL in the href so if the Payment History modal loads but clicking the CSV link causes a crash there may be a general problem with data URL handling.

@willy-b
Copy link
Contributor

willy-b commented Oct 3, 2016

@LucasZanella, If you could right click the CSV link, click "Copy Link Address" and paste it here, that would be extremely helpful. (NOTE: this will share the contents of the CSV)

@mrose17 mrose17 added this to the 0.12.5dev milestone Oct 3, 2016
@willy-b
Copy link
Contributor

willy-b commented Oct 3, 2016

OK, figured this out after talking with Alex from BitGo who had this problem.

The pre-packaged download / version of Brave pushed by update does not have #4332 in it (specifically 87ad861 ).
Whereas it IS in the latest tags from Git, e.g. https://github.com/brave/browser-laptop/releases/tag/v0.12.3dev . The pre-#4332 CSV export (which used an Electron call to download rather than a data URL) appears to cause this crash.

Question for @bbondy or any other Brave-r:
how does one figure out which Git hash a packaged release (on Downloads page or pushed via update) is built from?

@diracdeltas
Copy link
Member

@willy-b i think releases are built from the tip of the dev-channel branch but @bbondy can correct me if not

@willy-b
Copy link
Contributor

willy-b commented Oct 4, 2016

Ok, cool. Is there a build timestamp visible in Brave so you can figure out what was in dev-channel at the time the release was packaged?


Here's why I'm asking (only for the pathologically curious or those confused about the same thing).
The Dev-channel was updated early this morning, at ~5:30a w/ v0.12.3dev at commit 9117f09:
0 12 3dev_released_530a

That hash includes the data URL for export fix (87ad861).

However, the 64-bit linux .deb downloaded from the Brave downloads page at 1:40p pst (brave_0.12.3_amd64.deb, sha256sum starting w/ 2394f) doesn't have the data URL change:
bravepayments0 12 3_prepackaged_build_no_data_url

So the brave_0.12.3_amd64.deb I downloaded must have been prepared earlier than 5:30a and it would be cool to be able to tell that easily :-)

@mrose17
Copy link
Member

mrose17 commented Oct 4, 2016

@willy-b - are you of the opinon that builds with #4332 will not have the problem seen by @LucasZanella & @bitcoinuser ?

@willy-b
Copy link
Contributor

willy-b commented Oct 4, 2016

Yes, @mrose17 , as it is just a standard data URL link, e.g. <a href="data:text/csv;base64,[...]"> instead of a link with an onClick handler which tiggers an IPC message and an Electron call to downloadURL.

See diff:
87ad861#diff-e3eeb751016b2ce9f8278efce585a461L543

@mrose17
Copy link
Member

mrose17 commented Oct 6, 2016

@willy-b - many thanks!

@mrose17 mrose17 closed this as completed Oct 6, 2016
@luixxiul luixxiul removed this from the 0.12.5dev milestone Oct 8, 2016
# for free to subscribe to this conversation on GitHub. Already have an account? #.
Projects
None yet
Development

No branches or pull requests

7 participants