Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Image search crashes when using Patchwork's ssb server #432

Open
cinnamon-bun opened this issue May 8, 2020 · 9 comments
Open

Image search crashes when using Patchwork's ssb server #432

cinnamon-bun opened this issue May 8, 2020 · 9 comments
Labels
bug Something isn't working
Milestone

Comments

@cinnamon-bun
Copy link
Collaborator

cinnamon-bun commented May 8, 2020

What's the problem you want solved?

http://localhost:3000/imageSearch?query=totoro

TypeError: Cannot read property 'search' of undefined
    at /usr/local/lib/node_modules/@fraction/oasis/src/models.js:179:18
    at new Promise (<anonymous>)
    at Object.search (/usr/local/lib/node_modules/@fraction/oasis/src/models.js:178:14)
    at processTicksAndRejections (internal/process/task_queues.js:97:5)
    at async /usr/local/lib/node_modules/@fraction/oasis/src/index.js:316:27
    at async middleware (/usr/local/lib/node_modules/@fraction/oasis/src/index.js:806:7)
    at async /usr/local/lib/node_modules/@fraction/oasis/src/index.js:784:5
    at async /usr/local/lib/node_modules/@fraction/oasis/src/index.js:779:5
    at async /usr/local/lib/node_modules/@fraction/oasis/src/http.js:113:5
    at async /usr/local/lib/node_modules/@fraction/oasis/node_modules/koa-mount/index.js:52:26

It works when Oasis is run by itself (using its own ssb server).

Is there a solution you'd like to recommend?

If we want to run at the same time as Patchwork does that mean we can't rely on our own plugins being present?

@cinnamon-bun cinnamon-bun added the bug Something isn't working label May 8, 2020
@cinnamon-bun cinnamon-bun added this to the 2: Usable milestone May 8, 2020
@christianbundy
Copy link
Member

Oh, yeah that's not good at all. I think we should probably revert the image search until we have a SSB-SQLite flumeview that can provide that for us. What do you think @Powersource?

@sbillig
Copy link
Collaborator

sbillig commented May 8, 2020

:(

Is it possible to add a plugin on the fly? Or could ssb-meme be added to patchwork without much drama? It'd be a shame for oasis to be held back by patchwork.

Or, gasp, what if we just abandoned compatibility?

@sbillig
Copy link
Collaborator

sbillig commented May 9, 2020

Or, perhaps we could just do some plugin-detection at startup and disable features when required plugins are missing?

@christianbundy
Copy link
Member

My evil plan: use this experiment with data from createLogStream() and uninstall all the Secret-Stack plugins that are making indexing slow and causing huge pain points for developers working on this project. I have a branch here that's even compatible with the Go back-end, but it doesn't use SQLite so it's slow as hell (and doesn't have any persistence).

@christianbundy
Copy link
Member

In other words: I'd like to continue supporting Patchwork, but I'd like to support it in the "yeah it supports createLogStream()" sense rather than "yeah we share a bunch of Secret-Stack plugins and it'll limit us forever" sense.

@Powersource
Copy link
Collaborator

revert the image search until we have a SSB-SQLite flumeview that can provide that for us

To my ears (correct me if I'm wrong) an "SSB-SQLite flumeview" sounds super far away, and I'm not too attached to the compatibility, so I'd say keep the image search (biased tho).

@Powersource
Copy link
Collaborator

Another option is to only render the Image Search sidebar button if we detect that the plugin is installed (which should be pretty easy right?)

@christianbundy
Copy link
Member

To my ears (correct me if I'm wrong) an "SSB-SQLite flumeview" sounds super far away

It's something I'm actively working on (like, I saw your notification and paused my work on it -- my other window is vim open hacking on it) and I don't think it's far away at all. I'm working on a fork of Cinnamon's prototype here: https://github.com/christianbundy/ssb-sqlite-index-experiment/

@Powersource
Copy link
Collaborator

Coool! Looking forward to it :D

I'd vote for hiding the image search from patchwork users until we have that, feels like the best compromise to me

This was referenced Nov 27, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Development

No branches or pull requests

4 participants