spyglass-search / spyglass

A personal search engine: Create a searchable library from your personal documents, interests, and more!
https://docs.spyglass.fyi
GNU Affero General Public License v3.0
2.55k stars 58 forks source link

All spyglass screens are blank. #166

Closed jerrac closed 2 years ago

jerrac commented 2 years ago

spyglassblankscreen That's all I get for Crawl Status, Manage Lenses, Manage Plugins, and Preferences. I get a shorter blank screen with no title bar for Show Search.

This on Pop!_OS 20.04.

I've tried both the AppImage and the deb files a few times over the past few weeks since I found this project... Always get the same thing, blank screens.

I have tried deleting /home/username/.config/spyglass and /home/username/.local/share/spyglass before starting spyglass as well.

client.log:

2022-08-12T19:16:27.436337Z  INFO spyglass_app: Loading prefs from: "/home/username/.config/spyglass"    
2022-08-12T19:16:27.439753Z  INFO spyglass_app::rpc: Starting backend    
2022-08-12T19:16:27.440864Z  INFO spyglass_app: checking for update...  

server.log:

2022-08-12T19:16:27.451025Z  INFO spyglass: Loading prefs from: "/home/username/.config/spyglass"    
2022-08-12T19:16:27.468564Z  INFO sea_orm_migration::migrator: Applying all pending migrations
2022-08-12T19:16:27.468922Z  INFO sea_orm_migration::migrator: Applying migration 'm20220505_000001_create_table'
2022-08-12T19:16:27.476323Z  INFO sea_orm_migration::migrator: Migration 'm20220505_000001_create_table' has been applied
2022-08-12T19:16:27.477876Z  INFO sea_orm_migration::migrator: Applying migration 'm20220508_000001_lens_and_crawl_queue_update'
2022-08-12T19:16:27.480537Z  INFO sea_orm_migration::migrator: Migration 'm20220508_000001_lens_and_crawl_queue_update' has been applied
2022-08-12T19:16:27.481752Z  INFO sea_orm_migration::migrator: Applying migration 'm20220522_000001_bootstrap_queue_table'
2022-08-12T19:16:27.483063Z  INFO sea_orm_migration::migrator: Migration 'm20220522_000001_bootstrap_queue_table' has been applied
2022-08-12T19:16:27.484279Z  INFO sea_orm_migration::migrator: Applying migration 'm20220718_000001_add_cols_to_lens'
2022-08-12T19:16:27.488258Z  INFO sea_orm_migration::migrator: Migration 'm20220718_000001_add_cols_to_lens' has been applied
2022-08-12T19:16:27.489879Z  WARN jsonrpc_ipc_server::server: Removed existing file '/tmp/ipc-spyglass'.    
2022-08-12T19:16:27.489980Z  INFO spyglass::api: Started IPC server at /tmp/ipc-spyglass    
2022-08-12T19:16:27.490228Z  INFO libspyglass::task: 👀 lens watcher started    
2022-08-12T19:16:27.490252Z  INFO manager_task: libspyglass::task: manager started    
2022-08-12T19:16:27.490256Z  INFO libspyglass::task: worker started    
2022-08-12T19:16:27.490314Z  INFO plugin_manager: libspyglass::plugin: plugin manager started    
2022-08-12T19:16:27.490505Z  INFO plugin_manager: libspyglass::plugin: 🔌 loading plugins    
2022-08-12T19:16:27.490643Z  INFO libspyglass::search::lens: ✅ finished lens checks    
2022-08-12T19:16:27.492368Z  INFO plugin_manager: libspyglass::plugin: loaded lens local-file-importer, new? true    
2022-08-12T19:16:27.492504Z  INFO plugin_manager: libspyglass::plugin: <local-file-importer> plugin found    
2022-08-12T19:16:27.494279Z  INFO plugin_manager: libspyglass::plugin: loaded lens firefox-importer, new? true    
2022-08-12T19:16:27.494413Z  INFO plugin_manager: libspyglass::plugin: <firefox-importer> plugin found    
2022-08-12T19:16:27.495993Z  INFO plugin_manager: libspyglass::plugin: loaded lens chrome-importer, new? true    
2022-08-12T19:16:27.496096Z  INFO plugin_manager: libspyglass::plugin: <chrome-importer> plugin found      

Is there a way to start with a debug mode to figure out what is going on?

a5huynh commented 2 years ago

This feels like a missing dependency for the webview. Would you mind checking to see if you have all the linux requirements for Tauri? https://tauri.app/v1/guides/getting-started/prerequisites#setting-up-linux

jerrac commented 2 years ago

I had most of those dependencies, but I did need the following:

The following additional packages will be installed:
  gir1.2-ayatanaappindicator3-0.1 libdbus-glib-1-dev libdbus-glib-1-dev-bin libdbusmenu-glib-dev libjavascriptcoregtk-4.0-dev
The following NEW packages will be installed:
  gir1.2-ayatanaappindicator3-0.1 libayatana-appindicator3-dev libdbus-glib-1-dev libdbus-glib-1-dev-bin libdbusmenu-glib-dev
  libjavascriptcoregtk-4.0-dev libwebkit2gtk-4.0-dev

Also ended up upgrading rustc to 1.63.0 (4b91a6ea7 2022-08-08) (from rustc 1.49.0 (e1884a8e3 2020-12-29)). I didn't realize it had been that long since I tried any rust programming... :\

Anyway, I'm still getting blank screens. I shouldn't need to restart X or anything, right?

a5huynh commented 2 years ago

Anyway, I'm still getting blank screens. I shouldn't need to restart X or anything, right?

I don't think so and it's weird that there are no errors at all.

Are you able to run the AppImage from the command line? There might be logs there from the OS that could give a hint to whats going on. Otherwise I've been meaning to try out PopOS 🙂. We'll have to compile from source to see whats wrong

a5huynh commented 2 years ago

@jerrac, I was able to run the latest AppImage with a fresh install of Pop!_OS 22.04 LTS. It might be an issue w/ that older version?

jerrac commented 2 years ago

Could be. I tend to keep my local system at least mostly in sync with my servers, so I haven't tried upgrading.

Anyway, I do get an error when I try to run the appimage via the command line:

./spyglass_22.8.8_amd64.AppImage
2022-08-13T01:58:30.646107Z  INFO main spyglass_app: Loading prefs from: "/home/username/.config/spyglass"    
2022-08-13T01:58:30.660088Z  INFO main spyglass_app::rpc: Starting backend    
2022-08-13T01:58:30.661262Z  INFO tokio-runtime-worker spyglass_app: checking for update...    

(WebKitWebProcess:276752): Gdk-ERROR **: 18:58:32.117: The program 'WebKitWebProcess' received an X Window System error.
This probably reflects a bug in the program.
The error was 'BadValue (integer parameter out of range for operation)'.
  (Details: serial 211 error_code 2 request_code 151 (GLX) minor_code 34)
  (Note to programmers: normally, X errors are reported asynchronously;
   that is, you will receive the error a while after causing it.
   To debug your program, run it with the GDK_SYNCHRONIZE environment
   variable to change this behavior. You can then get a meaningful
   backtrace from your debugger if you break on the gdk_x_error() function.)

(spyglass:276725): GLib-CRITICAL **: 18:58:40.859: Failed to set scheduler settings: Operation not permitted

(WebKitWebProcess:276939): Gdk-ERROR **: 18:58:41.095: The program 'WebKitWebProcess' received an X Window System error.
This probably reflects a bug in the program.
The error was 'BadValue (integer parameter out of range for operation)'.
  (Details: serial 211 error_code 2 request_code 151 (GLX) minor_code 34)
  (Note to programmers: normally, X errors are reported asynchronously;
   that is, you will receive the error a while after causing it.
   To debug your program, run it with the GDK_SYNCHRONIZE environment
   variable to change this behavior. You can then get a meaningful
   backtrace from your debugger if you break on the gdk_x_error() function.)

The second error showed up when I tried to view a settings screen.

jerrac commented 2 years ago

Hmm... I just tried compiling. It spit out over 5000 lines of errors.

Most of them like:

error[E0425]: cannot find function, tuple struct or tuple variant `Ok` in this scope
   --> /home/username/.cargo/registry/src/github.com-1ecc6299db9ec823/base64-0.13.0/src/decode.rs:560:5

I never got more than a few chapters into the rust book during my aborted attempt to learn rust, so I have no idea if those errors are due to something missing on my system, or an actual bug.

In any case, something is definitely off with running Spyglass on PopOS 20.04.

Out of curiosity, have you been able to run it on Ubuntu 20.04?

So, to fulfill my curiosity, I booted up an old Budgie (yet another Ubuntu based distro) 20.04 vm I had sitting around. Ran updates, then tried spyglass on it.

I think it partially worked. The search box does show up properly. For whatever reason, the spyglass icon in the taskbar was rendered full size, so I couldn't actually see the settings screen I tried to load...

Screenshot_budgie20 04_2022-08-12_19:36:34

I also got this output:

$ ./spyglass_22.8.8_amd64.AppImage 
2022-08-13T02:32:32.296108Z  INFO main spyglass_app: Loading prefs from: "/home/username/.config/spyglass"    
2022-08-13T02:32:32.313810Z  INFO main spyglass_app::rpc: Starting backend    
2022-08-13T02:32:32.318313Z  INFO tokio-runtime-worker spyglass_app: checking for update...    
2022-08-13T02:32:34.217578Z  INFO                 main spyglass_app: Registering CmdOrCtrl+Shift+/ as shortcut    
Asset `settings/lenses` not found; fallback to settings/lenses.html
2022-08-13T02:33:29.014280Z ERROR tokio-runtime-worker jsonrpc_client_transports::transports::ipc: IPC stream error: bytes remaining on stream    
2022-08-13T02:33:29.021764Z ERROR tokio-runtime-worker spyglass_app::rpc: sidecar terminated: TerminatedPayload { code: None, signal: Some(9) }    

Which leaves me thinking there's something weird about my system... Fun.

a5huynh commented 2 years ago

Unfortunately, the Ubuntu box that I have is also on 22.04 as well. I'll try running the older versions to see if I run into the same thing. Looking through the tauri docs, issues on older system might stem from the AppImage being built on a 22.04 distro.

With regards to those error messages when you compile from source, what version of Rust are you running?

jerrac commented 2 years ago

Just upgraded rust today to the latest when you asked me to make sure the Tauri deps were installed.

rustc -V          
rustc 1.63.0 (4b91a6ea7 2022-08-08)

Also, after digging up an iso, I threw up a brand new PopOS 20.04 vm. The latest appimage gives me more than just a blank screen, but crawling doesn't seem to be working, and adding a folder to to the local-file-importer folders list setting doesn't seem to stick around after I save and restart.

Anyway, out of time to test today, so I'll see if I can figure out if the issues with the vm are user error, or something else, tomorrow...

jerrac commented 2 years ago

Restarting fixed the blank screens issue.

a5huynh commented 2 years ago

Awesome glad to hear it! Do you think it was just the missing dependencies in the end?

jerrac commented 2 years ago

Maybe, but from some of what I was seeing when I searched that initial error, I think the running version of a library was just too old. I hadn't rebooted in 42 days.