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

App launches without UI #30

Closed
twerq opened this issue Mar 8, 2018 · 15 comments
Closed

App launches without UI #30

twerq opened this issue Mar 8, 2018 · 15 comments

Comments

@twerq
Copy link

twerq commented Mar 8, 2018

After app launched, I see window with menu and blank area:
screenshot from 2018-03-08 15-37-23

From console of xray electron app:

Uncaught Error: Cannot find module 'xray'
    at Module._resolveFilename (module.js:543:15)
    at Function.Module._resolveFilename ($HOME/path/xray/xray_electron/node_modules/electron/dist/resources/electron.asar/common/reset-search-paths.js:35:12)
    at Function.Module._load (module.js:473:25)
    at Module.require (module.js:586:17)
    at require (internal/module.js:11:18)
    at Object.<anonymous> ($HOME/path/xray/xray_electron/lib/render_process/main.js:5:14)
    at Object.<anonymous> ($HOME/path/xray/xray_electron/lib/render_process/main.js:37:3)
    at Module._compile (module.js:642:30)
    at Object.Module._extensions..js (module.js:653:10)
    at Module.load (module.js:561:32)
$ npm install

> electron@2.0.0-beta.1 postinstall $HOME/path/xray/xray_electron/node_modules/electron
> node install.js

npm WARN Xray@0.1.0 No repository field.

added 1 package from 1 contributor in 9.842s

$ rustup -V
rustup 1.11.0 (e751ff9f8 2018-02-13)
$ node -v
v9.8.0
$ uname -a
Linux catsys 4.4.0-116-generic #140-Ubuntu SMP Mon Feb 12 21:23:04 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux

@apcragg
Copy link

apcragg commented Mar 8, 2018

I had the same issue. Try npm rebuild and see if any errors are thrown. In my case, the xray module silently failed it's build but npm install wasn't showing it. If you still don't see any errors, go to xray_node and run npm run-script build. You will probably see some errors there. If you do, could you post them here?

@twerq
Copy link
Author

twerq commented Mar 8, 2018

run npm run-script build. You will probably see some errors there. If you do, could you post them here?

Yes, I have seen some warnings only:

xray/xray_node $ npm run-script build

> xray@0.0.1 build src/xray/xray_node
> napi build

   Compiling futures v0.1.17
   Compiling quote v0.3.15
   Compiling bindgen v0.32.1
   Compiling glob v0.2.11
   Compiling cfg-if v0.1.2
   Compiling cc v1.0.4
   Compiling regex-syntax v0.4.2
   Compiling utf8-ranges v1.0.0
   Compiling libc v0.2.35
   Compiling lazy_static v1.0.0
   Compiling unicode-width v0.1.4
   Compiling peeking_take_while v0.1.2
   Compiling libloading v0.4.3
   Compiling bitflags v1.0.1
   Compiling ansi_term v0.10.2
   Compiling strsim v0.6.0
   Compiling void v1.0.2
   Compiling vec_map v0.8.0
   Compiling log v0.4.1
   Compiling clang-sys v0.21.1
   Compiling rand v0.3.20
   Compiling which v1.0.3
   Compiling atty v0.2.6
   Compiling memchr v1.0.2
   Compiling memchr v2.0.1
   Compiling textwrap v0.9.0
   Compiling unreachable v1.0.0
   Compiling log v0.3.9
   Compiling nom v3.2.1
   Compiling aho-corasick v0.6.4
   Compiling xray_core v0.1.0 (file://xray/xray_core)
warning: method is never used: `iter`
  --> /xray/xray_core/src/tree.rs:90:5
   |
90 |     pub fn iter(&self) -> Iter<T> {
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
   = note: #[warn(dead_code)] on by default

warning: method is never used: `new`
   --> xray/xray_core/src/tree.rs:279:5
    |
279 |     fn new(tree: &'a Tree<T>) -> Self {
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

   Compiling thread_local v0.3.5
   Compiling clap v2.29.2
   Compiling cexpr v0.2.2
   Compiling regex v0.2.5
   Compiling env_logger v0.4.3
   Compiling napi v0.1.0 (file://xray/napi)
   Compiling xray_node v0.1.0 (file:///xray/xray_node)
warning: unused import: `futures::future::Executor`
 --> src/lib.rs:8:5
  |
8 | use futures::future::Executor;
  |     ^^^^^^^^^^^^^^^^^^^^^^^^^
  |
  = note: #[warn(unused_imports)] on by default

warning: unused import: `futures::Stream`
 --> src/lib.rs:9:5
  |
9 | use futures::Stream;
  |     ^^^^^^^^^^^^^^^

    Finished dev [unoptimized + debuginfo] target(s) in 182.33 secs

@nathansobo
Copy link

We're considering a pretty big architectural change that may eliminate these build issues. Stay tuned.

@rayascott-zz
Copy link

I seem to get even less of a UI than @infodiver

screenshot_20180309_094347

@lucat1
Copy link

lucat1 commented Mar 9, 2018

@rayascott This is indeed the current UI. The default fonts are bad on your system, but it's nothing that can't be fixed with some CSS tooling.

For example, this is how it currently looks on a mac:

screen shot 2018-03-09 at 15 12 21

@rayascott-zz
Copy link

@lucat1 I see! Thanks for letting me know.

@mati865
Copy link

mati865 commented Mar 9, 2018

@rayascott are you using AppMenu by any chance?
On Arch with Gnome it doesn't look so bad:
zrzut ekranu z 2018-03-09 18-30-11

@twerq
Copy link
Author

twerq commented Mar 9, 2018

We're considering a pretty big architectural change that may eliminate these build issues. Stay tuned.

Some news, anyway. I've managed to start over and cloned fresh copy of the repo. And now the picture just the same, but new errors in app console:

Uncaught (in promise) TypeError: Cannot read property 'enable' of null
    at new Renderer ($HOME/path/xray/xray_electron/lib/render_process/text_editor/text_plane.js:73)
    at TextPlane.componentDidUpdate ($HOME/path/xray/xray_electron/lib/render_process/text_editor/text_plane.js:37)
    at commitLifeCycles ($HOME/path/xray/xray_electron/node_modules/react-dom/cjs/react-dom.production.min.js:149)
    at b ($HOME/path/xray/xray_electron/node_modules/react-dom/cjs/react-dom.production.min.js:158)
    at m ($HOME/path/xray/xray_electron/node_modules/react-dom/cjs/react-dom.production.min.js:169)
    at w ($HOME/path/xray/xray_electron/node_modules/react-dom/cjs/react-dom.production.min.js:168)
    at z ($HOME/path/xray/xray_electron/node_modules/react-dom/cjs/react-dom.production.min.js:167)
    at u ($HOME/path/xray/xray_electron/node_modules/react-dom/cjs/react-dom.production.min.js:165)
    at Object.updateContainer ($HOME/path/xray/xray_electron/node_modules/react-dom/cjs/react-dom.production.min.js:175)
    at $HOME/path/xray/xray_electron/node_modules/react-dom/cjs/react-dom.production.min.js:225
$HOME/path/xray/xray_electron/lib/render_process/text_editor/text_plane.js:73 

Uncaught (in promise) TypeError: Cannot read property 'enable' of null
    at new Renderer ($HOME/path/xray/xray_electron/lib/render_process/text_editor/text_plane.js:73)
    at TextPlane.componentDidUpdate ($HOME/path/xray/xray_electron/lib/render_process/text_editor/text_plane.js:37)
    at commitLifeCycles ($HOME/path/xray/xray_electron/node_modules/react-dom/cjs/react-dom.production.min.js:149)
    at b ($HOME/path/xray/xray_electron/node_modules/react-dom/cjs/react-dom.production.min.js:158)
    at m ($HOME/path/xray/xray_electron/node_modules/react-dom/cjs/react-dom.production.min.js:169)
    at w ($HOME/path/xray/xray_electron/node_modules/react-dom/cjs/react-dom.production.min.js:168)
    at z ($HOME/path/xray/xray_electron/node_modules/react-dom/cjs/react-dom.production.min.js:167)
    at u ($HOME/path/xray/xray_electron/node_modules/react-dom/cjs/react-dom.production.min.js:165)
    at Object.enqueueSetState ($HOME/path/xray/xray_electron/node_modules/react-dom/cjs/react-dom.production.min.js:108)
    at TextEditorContainer.A.setState ($HOME/path/xray/xray_electron/node_modules/react/cjs/react.production.min.js:12)
$HOME/path/xray/xray_electron/lib/render_process/text_editor/text_plane.js:73 

Uncaught (in promise) TypeError: Cannot read property 'enable' of null
    at new Renderer ($HOME/path/xray/xray_electron/lib/render_process/text_editor/text_plane.js:73)
    at TextPlane.componentDidUpdate ($HOME/path/xray/xray_electron/lib/render_process/text_editor/text_plane.js:37)
    at commitLifeCycles ($HOME/path/xray/xray_electron/node_modules/react-dom/cjs/react-dom.production.min.js:149)
    at b ($HOME/path/xray/xray_electron/node_modules/react-dom/cjs/react-dom.production.min.js:158)
    at m ($HOME/path/xray/xray_electron/node_modules/react-dom/cjs/react-dom.production.min.js:169)
    at w ($HOME/path/xray/xray_electron/node_modules/react-dom/cjs/react-dom.production.min.js:168)
    at z ($HOME/path/xray/xray_electron/node_modules/react-dom/cjs/react-dom.production.min.js:167)
    at u ($HOME/path/xray/xray_electron/node_modules/react-dom/cjs/react-dom.production.min.js:165)
    at Object.enqueueSetState ($HOME/path/xray/xray_electron/node_modules/react-dom/cjs/react-dom.production.min.js:108)
    at TextEditorContainer.A.setState ($HOME/path/xray/xray_electron/node_modules/react/cjs/react.production.min.js:12)
$HOME/path/xray/xray_electron/lib/render_process/text_editor/text_plane.js:73 

Uncaught (in promise) TypeError: Cannot read property 'enable' of null
    at new Renderer ($HOME/path/xray/xray_electron/lib/render_process/text_editor/text_plane.js:73)
    at TextPlane.componentDidUpdate ($HOME/path/xray/xray_electron/lib/render_process/text_editor/text_plane.js:37)
    at commitLifeCycles ($HOME/path/xray/xray_electron/node_modules/react-dom/cjs/react-dom.production.min.js:149)
    at b ($HOME/path/xray/xray_electron/node_modules/react-dom/cjs/react-dom.production.min.js:158)
    at m ($HOME/path/xray/xray_electron/node_modules/react-dom/cjs/react-dom.production.min.js:169)
    at w ($HOME/path/xray/xray_electron/node_modules/react-dom/cjs/react-dom.production.min.js:168)
    at z ($HOME/path/xray/xray_electron/node_modules/react-dom/cjs/react-dom.production.min.js:167)
    at u ($HOME/path/xray/xray_electron/node_modules/react-dom/cjs/react-dom.production.min.js:165)
    at Object.enqueueSetState ($HOME/path/xray/xray_electron/node_modules/react-dom/cjs/react-dom.production.min.js:108)
    at TextEditorContainer.A.setState ($HOME/path/xray/xray_electron/node_modules/react/cjs/react.production.min.js:12)

As @apcragg mentioned to try to rebuild the app. In my very first build I've used dated node, then installed deps, updated node and perfomed new builds. So I guessed my builds may get 'dirty' and managed to start over with clean build. Some progress anyway, as I can see.

@nathansobo
Copy link

I'm going to close this out because

  1. Yes, it's early days, and we barely have a UI. We've made decent progress on the internals though
  2. We're about to make a pretty major adjustment in our architecture that I'll write about today or Monday that will probably eliminate these particular errors. If after this adjustment there are new errors, feel free to open a new issue.

Thanks for your interest. Wish there were more UI, but honestly looking at the code is going to be more interested than looking at the UI right now unless you just want to test performance. Again, early days.

@twerq
Copy link
Author

twerq commented Mar 12, 2018

In case of similar experience you should check #27.
Don't forget to:

  • install libclang-4.0-dev llvm-4.0-dev ( 3.9, 5.0 or whatever )

  • update-alternatives for clang and llvm

screenshot from 2018-03-12 08-20-07

@twerq
Copy link
Author

twerq commented Mar 14, 2018

If after this adjustment there are new errors, feel free to open a new issue

Early morning 03/12 I'd got pretty nice build and posted screenshot then. Later 'git pull' and received the 03/12 update. Rebuild. So from that moment I can see blank window and errors in app console:

$HOME/path/xray/xray_electron/lib/render_process/text_editor/text_plane.js:77 Uncaught (in promise) TypeError: Cannot read property 'enable' of null
    at new Renderer ($HOME/path/xray/xray_electron/lib/render_process/text_editor/text_plane.js:77)
    at TextPlane.componentDidUpdate ($HOME/path/xray/xray_electron/lib/render_process/text_editor/text_plane.js:37)
    at commitLifeCycles ($HOME/path/xray/xray_electron/node_modules/react-dom/cjs/react-dom.production.min.js:149)
    at b ($HOME/path/xray/xray_electron/node_modules/react-dom/cjs/react-dom.production.min.js:158)
    at m ($HOME/path/xray/xray_electron/node_modules/react-dom/cjs/react-dom.production.min.js:169)
    at w ($HOME/path/xray/xray_electron/node_modules/react-dom/cjs/react-dom.production.min.js:168)
    at z ($HOME/path/xray/xray_electron/node_modules/react-dom/cjs/react-dom.production.min.js:167)
    at u ($HOME/path/xray/xray_electron/node_modules/react-dom/cjs/react-dom.production.min.js:165)
    at Object.enqueueSetState ($HOME/path/xray/xray_electron/node_modules/react-dom/cjs/react-dom.production.min.js:108)
    at TextEditorContainer.A.setState ($HOME/path/xray/xray_electron/node_modules/react/cjs/react.production.min.js:12)

I can't say this error is new. What is new: quantity is growing about two error per second. So there are a lot of them populated in a minute.

@twerq
Copy link
Author

twerq commented Mar 14, 2018

I have no permission to reopen the issue:

you can re-open your own issues *if you closed them yourself.
you cannot re-open your own issues if a repo collaborator closed them.

/via SO How to re-open an issue in github?

@nathansobo

@nathansobo
Copy link

We're still ironing out the new architecture and it's not worth addressing build issues on master right now. I'll follow up with an update when things are in a better state. Things are still really rough and we're really early in this project.

@twerq
Copy link
Author

twerq commented Mar 17, 2018

Investigated the issue and it looks like OpenGL 3.2 is required. If my assumption is correct, I shall ascertain necessity of this constraint. Why not to get along with OpenGL 2.1 version?

@nathansobo
Copy link

Why not get along with OpenGL 2.1 version?

WebGL 2 offers instanced rendering, which was useful for reducing the memory footprint of the glyphs buffer, so we decided to target it first. We can definitely add a fallback to WebGL 1 for what I think will be a marginal performance penalty.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants