Open PierreMarchand20 opened 3 years ago
@PierreMarchand20 do you see any errors in Help -> Toggle Developer Tools when you run it?
I have this :
Similar to PierreMarchand20
Weirdly enough, toggling Developer Tools and refreshing a few times will occasionally trigger a load of the data.
yeah, I need to look into this. That updateStats call just reports the number of records read from a data file and size in vscode status bar and ext. log.
Thank you for sharing your error outputs.
yeah, I need to look into this. That updateStats call just reports the number of records read from a data file and size in vscode status bar and ext. log.
Thank you for sharing your error outputs.
Let me know if you need something else. Your plugin, after Jupyter Notebooks, is the key reason to recommend VSCode... Coffee inbound.
Exact same error as @PierreMarchand20 and @mrsoftowl over here !
Hi there, as far as I find, the error is caused by the dark theme. Change the theme to light
to fix it temporarily.
Changing theme has no effect on my installation
so, after updating to vscode v1.53.2 I can finally reproduce this for a dark data preview theme. I was not able to do it with the initial v1.53 release. Also, interestingly enough an older data preview I had open for zipcodes while testing with earlier version of that vscode release worked, while creating new data preview after vscode update to latest did not.
Oddly enough, changing data preview to light
theme works.
If you want to try it, just change data preview theme setting in Preferences -> Settings -> Extensions -> Data Preview -> Theme
or set it in .vscode/settings.json
for your project similar to: https://github.com/RandomFractals/vscode-data-preview/blob/master/.vscode/settings.json
I'll see if I can debug and patch this soon. It's a bit tricky and I suspect there is more to it than that error we get. Thanks for your patience.
I am going to try this with new vscode v1.54 release today. I was not able to find the origin of this issue for the dark theme and that css is not much different from the stylesheet I am using for light data preview theme. I do suspect new built-in vscode table widget or something else related to webview loading has something to do with it since after fixing that stats update call I saw some Table trace logs that I did not recognize. Will try it in the latest vscode v. and keep you posted.
Both light and dark scheme fail randomly for me, with light theme seeming to work a bit more reliably. (light loaded data 6 out of 10 tries, dark loaded it 4 out of 10 tries).
FWIW, I get a similar but slightly different error as well. It might just be a linux thing though (vscode v1.54.1).
[[object Object]]Cannot read property 'toFixed' of undefined
$onExtensionRuntimeError @ mainThreadExtensionService.ts:59
mainThreadExtensionService.ts:60 TypeError: Cannot read property 'toFixed' of undefined
at Object.formatBytes (~/.vscode/extensions/randomfractalsinc.vscode-data-preview-2.3.0/out/utils/file.utils.js:95)
at DataPreview.updateStats (~/.vscode/extensions/randomfractalsinc.vscode-data-preview-2.3.0/out/data.preview.js:344)
at ~/.vscode/extensions/randomfractalsinc.vscode-data-preview-2.3.0/out/data.preview.js:205
at p.fire (/usr/share/code/resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:57)
at r._updateViewState (/usr/share/code/resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:88)
at s.$onDidChangeWebviewPanelViewStates (/usr/share/code/resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:88)
at u._doInvokeHandler (/usr/share/code/resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:90)
at u._invokeHandler (/usr/share/code/resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:90)
at u._receiveRequest (/usr/share/code/resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:90)
at u._receiveOneMessage (/usr/share/code/resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:90)
at /usr/share/code/resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:90
at p.fire (/usr/share/code/resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:57)
at g.fire (/usr/share/code/resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:65)
at /usr/share/code/resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:106
at p.fire (/usr/share/code/resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:57)
at g.fire (/usr/share/code/resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:65)
at t._receiveMessage (/usr/share/code/resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:65)
at /usr/share/code/resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:65
at p.fire (/usr/share/code/resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:57)
at l.acceptChunk (/usr/share/code/resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:65)
at /usr/share/code/resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:65
at Socket.E (/usr/share/code/resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:106)
at Socket.emit (events.js:315)
at addChunk (_stream_readable.js:295)
at readableAddChunk (_stream_readable.js:271)
at Socket.Readable.push (_stream_readable.js:212)
at Pipe.onStreamRead (internal/stream_base_commons.js:186)
$onExtensionRuntimeError @ mainThreadExtensionService.ts:60
mainThreadExtensionService.ts:59 [[object Object]]Cannot read property '0' of undefined
$onExtensionRuntimeError @ mainThreadExtensionService.ts:59
mainThreadExtensionService.ts:60 TypeError: Cannot read property '0' of undefined
at parse_xlml_xml (~/.vscode/extensions/randomfractalsinc.vscode-data-preview-2.3.0/node_modules/xlsx/xlsx.js:16111)
at parse_xlml (~/.vscode/extensions/randomfractalsinc.vscode-data-preview-2.3.0/node_modules/xlsx/xlsx.js:16530)
at Object.readSync [as read] (~/.vscode/extensions/randomfractalsinc.vscode-data-preview-2.3.0/node_modules/xlsx/xlsx.js:21009)
at ~/.vscode/extensions/randomfractalsinc.vscode-data-preview-2.3.0/out/data.providers/excel.data.provider.js:47
$onExtensionRuntimeError @ mainThreadExtensionService.ts:60
Same problem for me, VS Code 1.54.1. Does not load, however it accurately shows number of rows and size in the bottom bar
Similar error for me with a .csv
Just can't preview for a comma and pipe delimited file
It did work for me the first time I installed the extension.
Every other times I've been prompted to" Open a Data file to Preview Source:Data Preview (Extension).
Same here. Light theme works with no error but dark theme failed with error:
[Embedded Page] Registered perspective-computed-column
workbench.desktop.main.js:1541 [Embedded Page] Registered perspective-row
workbench.desktop.main.js:1541 [Embedded Page] Registered perspective-viewer
workbench.desktop.main.js:1541 [Embedded Page] Registered perspective-hypergrid
workbench.desktop.main.js:1541 [Embedded Page] Registered perspective-d3fc-chart
workbench.desktop.main.js:1541 [Embedded Page] data.view:interactive!
workbench.desktop.main.js:1541 [Embedded Page] data.view:initializeDataView()
initializing...
workbench.desktop.main.js:1541 [Embedded Page] data.view:window.WebComponentsReady
data viewer initialized!
workbench.desktop.main.js:1541 [Embedded Page] data.view:data size in bytes: 0
workbench.desktop.main.js:1541 [Embedded Page] data.view:document.readystatechange complete
data.view:complete!
workbench.desktop.main.js:1541 [Embedded Page] data.view:loadDataInfo()
data url: file:///[hidden].csv
data table:
workbench.desktop.main.js:1541 [Embedded Page] data.view:restoreConfig(
{})
workbench.desktop.main.js:1541 [Embedded Page] data.view:loadTableList(
tableNames = []
requestedDataTable = ''
)
workbench.desktop.main.js:1541 [Embedded Page] data.view:refresh(dataTable='')
loading data: [hidden].csv ...
workbench.desktop.main.js:1541 [Embedded Page] data.view:getData()
loading file data: [hidden].csv ...
workbench.desktop.main.js:1541 [Embedded Page] data.view:getData()
records count: 4
workbench.desktop.main.js:1541 [Embedded Page] data.view:refresh('')
updating view data: [hidden].csv ...
workbench.desktop.main.js:1541 [Embedded Page] Transferable support detected
workbench.desktop.main.js:1541 [Embedded Page] Loading wasm
workbench.desktop.main.js:1541 [Embedded Page] Abort(): Failed to open RecordBatchStreamReader: Tried reading schema message, was null or length 0
workbench.desktop.main.js:1541 [Embedded Page]
workbench.desktop.main.js:1541 [Embedded Page] Table initialization failed: Error: abort()
workbench.desktop.main.js:1541 [Embedded Page] Uncaught Error: abort()
2workbench.desktop.main.js:1541 [Embedded Page] Uncaught (in promise) #<Object>
workbench.desktop.main.js:1541 [Embedded Page] Uncaught Error: abort()
3workbench.desktop.main.js:1541 [Embedded Page] Uncaught (in promise) #<Object>
Can confirm that the extension will not preview CSV with theme Dark, but does work with theme: Light, and the first clue that I notice is columns: undefined
in the footer.
Hi, amazing extension! But sadly, I'm also getting preview issues with a large file (+26MB) in both light and dark themes. Refreshing the data in VS Code does not help much... I was able to get the data to load once, but I haven't been able to preview it since... at least 50 tries of refreshing and/or reopening the file.
In dev tools, i get similar errors as above. In the lower status bar, shows Columns: undefined
[Embedded Page] data.view:loadTableList(
tableNames = []
requestedDataTable = ''
)
webviewElement.ts:90 [Embedded Page] data.view:refresh(dataTable='')
loading data: data.csv ...
webviewElement.ts:90 [Embedded Page] data.view:getData()
loading file data: data.csv ...
webviewElement.ts:90 [Embedded Page] data.view:getData()
records count: 43,374
webviewElement.ts:90 [Embedded Page] data.view:refresh('')
updating view data: data.csv ...
[Embedded Page] Uncaught (in promise) #<Object>
Same problem for me too.
VS code Version: 1.54.2 OS: Darwin x64 19.6.0
well, it actually works on gitpod.io. So, I suspect there is a conflicting extension that stops it from working, or some faulty vscode update in the past two releases.
works with CSV files too. Try Data: Preview Remote data command and paste this data url: https://us-counties.datasette.io/counties/counties.csv
yep. just confirmed that it works in vscodium too. Please try uninstalling some data related extensions that might be causing that issue. I can't find the culprit.
PS: this is the problem and it's not coming from my extenion. something else steals data transfer to my webview:
workbench.desktop.main.js:1541 [Embedded Page] Transferable support detected
workbench.desktop.main.js:1541 [Embedded Page] Loading wasm
workbench.desktop.main.js:1541 [Embedded Page] Abort(): Failed to open RecordBatchStreamReader: Tried reading schema message, was null or length 0
workbench.desktop.main.js:1541 [Embedded Page]
workbench.desktop.main.js:1541 [Embedded Page] Table initialization failed: Error: abort()
workbench.desktop.main.js:1541 [Embedded Page] Uncaught Error: abort()
2workbench.desktop.main.js:1541 [Embedded Page] Uncaught (in promise) #<Object>
workbench.desktop.main.js:1541 [Embedded Page] Uncaught Error: abort()
3workbench.desktop.main.js:1541 [Embedded Page] Uncaught (in promise) #<Object>
The dark theme actually works once for me (the first time I installed the extension and the first file it opened). Then it won't load data ever again. I disabled all other extensions but nothing happened. Reinstalling vscode does not work either. It at least proved that it could work once in a life time.
@matrix-ranger have you tried it with the light
theme?
https://github.com/RandomFractals/vscode-data-preview/issues/250#issuecomment-787466218
Just set it to that for now, till I find the time to look into those data transfers issues.
I suspect they are related to new changes for byte array transfers:
https://code.visualstudio.com/updates/v1_56#_improved-transfer-of-arraybuffers-to-and-from-webviews
I was hoping vscode v1.56 release would fix it. I did not have time to investigate this further.
There is def. something very odd at the core going on there.
The light themes work well. And btw I am using vscode v1.56.
some devs experiencing this issue reported that prior version of DataPreview v2.2.0 worked.
Please try that version if you run into this issue on your vscode or OS.
You can download it from here: https://marketplace.visualstudio.com/items?itemName=RandomFractalsInc.vscode-data-preview&ssr=false#version-history
Not much changed since that version in 2.3.0. I am still not sure what's causing this.
Could be new WASM loading or other general vscode files reading issues on Darwin OS? https://github.com/RandomFractals/vscode-data-preview/issues/250#issuecomment-808664190
See them here for more info: https://github.com/microsoft/vscode/issues?q=is%3Aissue+WASM+Darwin
Please report your OS and version, if you run into this.
well, I can confirm that the last published Data Preview v2.3.0 works in vscode v1.56.0 on win7:
It also works in Code Spaces. See: https://github.com/RandomFractals/vscode-leaflet/issues/9#issuecomment-844463639
and in the latest vscode v1.56.2:
It works only in the light theme for me with no errors in the dark theme but failing to load.
Version: 1.56.2 (Universal) Commit: 054a9295330880ed74ceaedda236253b4f39a335 Date: 2021-05-12T17:44:30.902Z Electron: 12.0.4 Chrome: 89.0.4389.114 Node.js: 14.16.0 V8: 8.9.255.24-electron.0 OS: Darwin x64 19.6.0
that's good info. I tested it with @alefragnani last week and we narrowed it down to Darwin OS so far.
Still doesn't explain why switching data preview theme stylesheet would break or fix that data transfer and display.
There are quite a few issues related to extension host reload and wasm in vscode since v1.54.0 release.
I might bite the bullet and update that grid lib and dependencies and bundle this extension to trim it down a bit.
Other than that I am still puzzled by some of those errors.
Thanks for your findings @mhkeller. Much appreciated!
I just learned you can get some more debug output from the >
. Here's what I get on dark mode:
> window.WebComponentsReady
data viewer initialized!
> data size in bytes: 0
> document.readystatechange complete
data.view:complete!
> loadDataInfo()
data url: file:///Users/path/to/file.csv
data table:
> restoreConfig(
{})
> loadTableList(
tableNames = []
requestedDataTable = ''
)
> refresh(dataTable='')
loading data: file.csv ...
> getData()
loading file data: file.csv ...
> getData()
records count: 1,692
> refresh('')
updating view data: file.csv ...
>
versus light mode
> window.WebComponentsReady
data viewer initialized!
> document.readystatechange complete
data.view:complete!
> loadDataInfo()
data url: file:///path/to/file.csv
data table:
> restoreConfig(
{})
> loadTableList(
tableNames = []
requestedDataTable = ''
)
> refresh(dataTable='')
loading data: file.csv ...
> getData()
loading file data: file.csv ...
> getData()
records count: 1,692
> refresh(dataTable='')
initializing data view: file.csv ...
> viewer.perspective-config-update
plugin: hypergrid
editable: true
selectable: true
columns: <columnlist...>
row-pivots: null
column-pivots: null
aggregates: null
filters: null
sort: null
computed-columns: null
> updateStats()
columns: <columnlist...>
rows: 1,692
> updateStats()
columns: <columnlist...>
rows: 1,692
>
yeah, that provides some debug info. for some reason data is read from file in those blank grid cases, but never makes it to the data preview webview.
Hey, this is an awesome extension =) Unfortunately, I'm facing this issue too. Changing to white theme seemed to work.
Maybe the issue should be reopened for visibility? I almost opened one myself because I couldn't find anything related on the open ones.
@eduardocanellas I agree. This started with a trickle of random reports and turned into a major issue on Darwin OS now.
I am going to reopen it and wait for vscode v1.57.0 release coming soon that will be using different approach for bytes data transfer.
Please use the light stylesheet for now and ease up on the negative 1 star reviews until we find a solution.
Thanks!
so, vscode v1.57.0 is out. Can you try loading Data Preview with the dark theme and that version of vscode to see if this tricky webview data loading issue went away?
@RandomFractals Unfortunately, the problem persists here in 1.57.0. With the dark theme enabled, sometimes it works, sometimes it doesn't. FWIW, the light theme has been working great since I enabled it.
@eduardocanellas thanks for a quick check.
There is this bit in release notes, but that would only affect arrow data that I transfer via bytes array, and not other data file types.
https://code.visualstudio.com/updates/v1_57#_improved-webview-array-buffer-transfers
I still suspect it's related to wasm and webviews loading on Macs. There are just too many issues open in vscode repo for me to pin it down, and unfortunately I don't have a Mac to test it.
Maybe defaulting to light theme is all we can do for a quick fix and new users trying it on a Mac.
It worked once and then it did not anymore:
But it still works with light theme:
My OS is Linux, by the way. POP OS, to be more precise.
I get the same behavior in dark mode. light mode works fine
> window.WebComponentsReady
data viewer initialized!
> data size in bytes: 0
> loadDataInfo()
data url: file:///path/to/data.csv
data table:
> restoreConfig(
{})
> loadTableList(
tableNames = []
requestedDataTable = ''
)
> refresh(dataTable='')
loading data:data.csv ...
> getData()
loading file data: data.csv ...
> getData()
records count: 1,700
> refresh('')
updating view data: data.csv ...
> document.readystatechange complete
data.view:complete!
>
so, yeah, I think I'll change default to light theme next week and maybe see if updating engines to v1.57.0 will fix things for the dark theme.
Thank you guys for trying it again in the latest vscode release v.
also, webviews are less than stable once again in the latest release and a lot of devs are hitting webviews not loading issue:
https://github.com/microsoft/vscode/issues/122951
Please be aware of that.
Just chiming in saying this is one of my most favorite extensions but since the regressions a few months ago has become hard to use. I have found light theme to be much more reliable than dark theme.
I am on 2.3.0 for Data Preview and 1.58.2 for VS Code
@uditrana yes, please use the light data preview theme. Thanks for chiming in.
Chalk another one up for this; I want to look at a comma delimited CSV, but i'm getting the 'Open Data file to Preview' toast. I'm using the light theme, and there are no errors in the dev console.
@hmccurryWM try our Tabular Data Viewer from last year. It can load larger CSV files and uses more recent viewer v.:
https://marketplace.visualstudio.com/items?itemName=RandomFractalsInc.tabular-data-viewer
Sorry for the naive question, but I cannot preview a simple csv file:![image](https://user-images.githubusercontent.com/15056323/108366773-059e7c00-71f9-11eb-9547-86e8fb8bfaaa.png)
Am I missing something ? here is the log