GithubHelp home page GithubHelp logo

fraction / oasis Goto Github PK

View Code? Open in Web Editor NEW
283.0 8.0 42.0 6.92 MB

Free, open-source, peer-to-peer social application that helps you follow friends and discover new ones on Secure Scuttlebutt (SSB).

Home Page: http://oasis-demo.fraction.io

License: GNU Affero General Public License v3.0

JavaScript 90.82% CSS 7.03% Shell 0.89% Dockerfile 0.31% Go 0.95%
ssb scuttlebutt browser html javascript css nodejs p2p

oasis's Introduction

Oasis

Oasis is a free, open-source, peer-to-peer social application that helps you follow friends and discover new ones on Secure Scuttlebutt (SSB).

๐Ÿฆ€ Powered by SSB.
You're the center of your own distributed network. Online or offline, SSB works anywhere that you are. Follow the people you want to see and never worry about spam again. Switch to any SSB app you want at any time.

๐ŸŒ Bring your own browser.
Use your favorite web browser to read and write messages to the people you care about. Oasis runs a small HTTP server on your own computer, so you don't need to worry about adding another Electron app to your computer.

๐Ÿฐ Just HTML and CSS.
No browser JavaScript! Oasis has strict security rules that prevent any JavaScript from running in your browser, which helps us make Oasis accessible and easy to improve.

Example

After installing, launch Oasis from the command line by running:

oasis

It will then pop open a browser window for you.

Screenshot of Oasis

Use oasis --help to get configuration options. You can change the default values with a custom configuration.

Installation

First, you'll need Node.js and npm on your computer. Run node --version to see if you have it. If not, or if it's older than the current or active LTS version, you should download Node.js first.

Then you can install the stable version of Oasis:

npm -g install fraction/oasis#semver:

Or, for faster updates and less stability, install Oasis from GitHub and upgrade often.

npm -g install fraction/oasis

Check out install.md for more information.

FAQ

Can I use the same profile from multiple computers?

No, this is a limitation of SSB. You'll need to make a separate profile on each device. There is a workaround we'd like to implement which ties your multiple profiles together.

Can I run this at the same time as Patchwork and other SSB apps?

Yes! They will both use the same data and profile. You can either run them one at a time or simultaneously. If you run them at the same time, start Patchwork first, then Oasis.

Details: SSB apps have two parts: a "server" that manages the database (on your own computer), and a user interface that gets things from the server to display. Only one server can run at a time, but multiple apps can use it.

App Runs its own SSB server Can use SSB server of another app
Oasis Yes, unless one is already running Yes
Patchwork Yes No, only uses its own server
Patchbay Yes No, only uses its own server
Patchfox No Yes, depends on other apps to provide a server

Can I use Oasis as a desktop app?

Yes! Check out Oasis-Desktop!

Resources

See Also

License

AGPL-3.0

oasis's People

Contributors

asymmetric avatar black-puppydog avatar bramdroid avatar cafca avatar cblgh avatar christianbundy avatar cryptix avatar dependabot[bot] avatar georgeowell avatar hng avatar j053fabi0 avatar jdjkelly avatar jedahan avatar johanbove avatar justinabrahms avatar lindskog avatar m-rio avatar nickwynja avatar nsantini avatar perelandra0x309 avatar powersource avatar roxxers avatar sbillig avatar seekr avatar shriek avatar somarasu avatar stripedpajamas avatar timjrobinson avatar wuhei avatar zicmama avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

oasis's Issues

Improve navigation (sidebar?)

What version of this package are you using? 2.9.7

What problem do you want to solve? The top navbar is simple, but not very ergonomic (especially on small screens). I think we should improve it, but I'm not sure how.

What do you think is the correct solution to this problem? I think a Patchwork-style sidebar is reasonable on desktop, but I'm not sure what to do on mobile. Here's a very rough sketch that wouldn't take very long to implement:

Screenshot from 2019-12-16 11-48-02

I'm inspired to make a Shellogram-style sidebar that's more interactive, but I'm in some technical debt that would make that difficult right now. I should probably just repay that debt. My mistake was implementing a tree-like dependency graph where the most often-used tools (database connection, main template, etc) are leaf nodes, when really I think the leaf nodes should be the code that's used the least.

Now

index

Maybe future?

maybe-future

Are you willing to submit a pull request to implement this change? Yep.

Should we use npm instead of Yarn?

What version of this package are you using? 2.9.10

What problem do you want to solve? I started using Yarn because the lockfile seemed a bit simpler and Yarn seemed to have better support for caching packages for offline reinstalls, but I'm worried that it was the wrong move. While investigating the best systemic solution for #29 I saw some issues (yarnpkg/yarn#2042 and yarnpkg/yarn#3266) that made me skeptical that Yarn is aligned with my values of beginner-friendly behavior.

What do you think is the correct solution to this problem? It's super important to me that Oasis is easy and accessible for beginners, and I'd imagine that most beginners are using npm. Should we switch to using npm and replace yarn.lock with package-lock.json?

Are you willing to submit a pull request to implement this change? Yes.

cc: @cinnamon-bun @trashhalo @jjehannet @mycognosist

Search for message ID, blob ID, or feed ID

What version of this package are you using? 2.9.2

What problem do you want to solve? Searching for an SSB reference (message, blob, feed) doesn't take you to their page.

What do you think is the correct solution to this problem? Take people to what they paste!

Are you willing to submit a pull request to implement this change? I guess. ๐Ÿ™ƒ

Rename 'reply', 'comment', or both

What version of this package are you using? N/A

What problem do you want to solve? "reply" and "comment" aren't great verbs

What do you think is the correct solution to this problem? We should give them good names! Is "fork" better? I'm struggling with how to express the difference between "add a post to extend the current thread" and "add a post as a tangent off of a message".

Are you willing to submit a pull request to implement this change? Yes!

Sometimes connects to peers but doesn't get new messages

What's the problem you want to solved? ssbc/ssb-conn#11

Is there a solution you'd like to recommend? Maybe as a stopgap it would be wise to just add a "reset networking" button to the 'meta' page? I've been running ssb gossip reconnect in my terminal but I don't want people to have to use a terminal to workaround Oasis problems.

Profile page crash: "Param 0 must have a .id of type "feedId"

What version of this package are you using?
2.9.4

What operating system, Node.js, and npm version?
OS X 10.11.6
node v10.8.0
npm 6.3.0

What happened?
The Profile page shows an error message instead of any content.

This doesn't happen on my /author/xxxxxx page, only on /profile

This is the error when Oasis is using Patchwork's ssb-server:

Error: non-error thrown: {"message":"Param 0 must have a .id of type \"feedId\"","name":"UsageError","stack":"UsageError: Param 0 must have a .id of type \"feedId\"\n    at new ZE (/Applications/Patchwork-3.17.1.app/Contents/Resources/app.asar/node_modules/zerr/index.js:11:42)\n    at ZError (/Applications/Patchwork-3.17.1.app/Contents/Resources/app.asar/node_modules/zerr/index.js:13:14)\n    at Object.createUserStreamOpts (/Applications/Patchwork-3.17.1.app/Contents/Resources/app.asar/node_modules/ssb-db/lib/validators.js:146:14)\n    at validate (/Applications/Patchwork-3.17.1.app/Contents/Resources/app.asar/node_modules/muxrpc-validation/index.js:153:15)\n    at Object.<anonymous> (/Applications/Patchwork-3.17.1.app/Contents/Resources/app.asar/node_modules/muxrpc-validation/index.js:95:17)\n    at Object.hooked (/Applications/Patchwork-3.17.1.app/Contents/Resources/app.asar/node_modules/hoox/index.js:10:15)\n    at Object.localCall (/Applications/Patchwork-3.17.1.app/Contents/Resources/app.asar/node_modules/muxrpc/local-api.js:31:29)\n    at Object.<anonymous> (/Applications/Patchwork-3.17.1.app/Contents/Resources/app.asar/node_modules/muxrpc/local-api.js:37:22)\n    at PacketStreamSubstream.stream.read (/Applications/Patchwork-3.17.1.app/Contents/Resources/app.asar/node_modules/muxrpc/stream.js:69:23)\n    at PacketStream._onstream (/Applications/Patchwork-3.17.1.app/Contents/Resources/app.asar/node_modules/packet-stream/index.js:228:11)"}
    at Object.onerror (/Users/xxx/projects/ssb/oasis/node_modules/koa/lib/context.js:113:40)
    at onerror (/Users/xxx/projects/ssb/oasis/node_modules/koa/lib/application.js:148:32)
    at process._tickCallback (internal/process/next_tick.js:68:7)

And when Oasis is running its own ssb-server:

Error: non-error thrown: {"message":"Param 0 must have a .id of type \"feedId\"","name":"UsageError","stack":"UsageError: Param 0 must have a .id of type \"feedId\"\n    at new ZE (/Users/xxx/projects/ssb/oasis/node_modules/zerr/index.js:11:42)\n    at ZError (/Users/xxx/projects/ssb/oasis/node_modules/zerr/index.js:13:14)\n    at Object.createUserStreamOpts (/Users/xxx/projects/ssb/oasis/node_modules/ssb-db/lib/validators.js:146:14)\n    at validate (/Users/xxx/projects/ssb/oasis/node_modules/muxrpc-validation/index.js:153:15)\n    at Object.<anonymous> (/Users/xxx/projects/ssb/oasis/node_modules/muxrpc-validation/index.js:95:17)\n    at Object.hooked (/Users/xxx/projects/ssb/oasis/node_modules/hoox/index.js:10:15)\n    at Object.localCall (/Users/xxx/projects/ssb/oasis/node_modules/secret-stack/node_modules/muxrpc/local-api.js:31:29)\n    at Object.<anonymous> (/Users/xxx/projects/ssb/oasis/node_modules/secret-stack/node_modules/muxrpc/local-api.js:37:22)\n    at PacketStreamSubstream.stream.read (/Users/xxx/projects/ssb/oasis/node_modules/secret-stack/node_modules/muxrpc/stream.js:69:23)\n    at PacketStream._onstream (/Users/xxx/projects/ssb/oasis/node_modules/packet-stream/index.js:228:11)"}
    at Object.onerror (/Users/xxx/projects/ssb/oasis/node_modules/koa/lib/context.js:113:40)
    at onerror (/Users/xxx/projects/ssb/oasis/node_modules/koa/lib/application.js:148:32)
    at process._tickCallback (internal/process/next_tick.js:68:7)

Are you willing to submit a pull request to fix this bug?
No, I don't know how to fix it.

Hide messages that you're done with

What's the problem you want to solved? I have lots of trouble holding everything in my head at once and the mentions page stresses me out. Once I'm done with a message I'd like for it to be hidden somehow, but I'm not sure the best way to do this.

Is there a solution you'd like to recommend? Maybe each message should have a 'archive' button and each feed should have a way to filter those out? I know that Patchbay has an 'unread' plugin that marks a message as 'read' once it appears on your screen for some amount of time, but I think there are two problems:

  • I read lots of stuff that I want to reply to later. I'd rather have this be an explicit thing where I choose when I'm done with a message.
  • The unread plugin exists outside of the SSB log, so it doesn't persist via SSB. If we make this an explicit manual action I think that we can safely post this as a private message to ourselves, whereas making it automatic probably makes the volume of messages unreasonably large.

What's the best way to do this?

Show peer names in Meta & explain what's happening there

What's the problem you want to solved?
The Meta page shows peers I'm connected to, but only by their pubkey.

Is there a solution you'd like to recommend?
Instead of pubkey, show their names.

While we're revamping this, it's also a good time to add a bit of help text. People tend to be confused about peer network connections vs. social following connections. I've seen them get scared, saying "who's this person looking at me?? How did they find me?"

Maybe something like...

Peer connections ๐Ÿ’ปโšก๏ธ๐Ÿ’ป
Your computer is syncing data with these other computers. It will connect to any scuttlebutt pub and peer it can find, even if you have no relationship with them, as it looks for data from your friends.

  • @foo
  • @bar

(That's adapted from part of the scuttlebutt.nz help text which I wrote)

Unable to change theme

Browser:

Firefox Browser 72.0.1
Chromium Version 79.0.3945.79

What's the problem you want to solved?

I wanted to change the theme. I go to "meta" and change to any of the other themes.

What happens?

I am redirected to an error:

ReferenceError: URL is not defined
    at router.param.param.param.param.get.get.get.get.get.get.get.get.get.get.get.get.get.get.get.get.get.get.get.post.post.post.post.post.post.post (/usr/local/lib/node_modules/@fraction/oasis/src/index.js:512:21)
    at dispatch (/usr/local/lib/node_modules/@fraction/oasis/node_modules/koa-router/node_modules/koa-compose/index.js:44:32)
    at next (/usr/local/lib/node_modules/@fraction/oasis/node_modules/koa-router/node_modules/koa-compose/index.js:45:18)
    at /usr/local/lib/node_modules/@fraction/oasis/node_modules/koa-body/index.js:148:14
    at <anonymous>
    at process._tickCallback (internal/process/next_tick.js:188:7)

The theme is not changed.

Edit messages

What's the problem you want to solved? It's really easy to type something incorrectly and most other platforms reconcile this by letting you edit your messages.

Is there a solution you'd like to recommend? I wrote an edit plugin about a year ago and it works fine. The problem is that edited messages aren't understood by other views, so you'll have weird problems like: if you post A and then edit it to say B, if you search for B you'll get nothing so you have to search for A instead.

I think this is probably an improvement over no editing allowed, but it adds some funkiness and confusion about when edits work and when they don't.

Error: stream is closed at /srv/export/node_modules/muxrpc/index.js:45:25

Occasionally (approx 1/3rd of the time) when starting oasis without an external ssb-server, I encounter the following:

2019-08-13T00:29:18.878693990Z 2019-08-13T00:29:18.878Z koa-router GET /status
2019-08-13T00:29:18.880241814Z 
2019-08-13T00:29:18.880315568Z   Error: stream is closed
2019-08-13T00:29:18.880330756Z       at /srv/export/node_modules/muxrpc/index.js:45:25
2019-08-13T00:29:18.880338075Z       at remoteCall (/srv/export/node_modules/muxrpc/api.js:40:19)
2019-08-13T00:29:18.880344318Z       at obj.(anonymous function) (/srv/export/node_modules/muxrpc/api.js:25:18)
2019-08-13T00:29:18.880350599Z       at Promise (/srv/export/node_modules/@fraction/oasis/src/pages/models/lib/cooler.js:23:17)
2019-08-13T00:29:18.880359064Z       at new Promise (<anonymous>)
2019-08-13T00:29:18.880370308Z       at Object.get (/srv/export/node_modules/@fraction/oasis/src/pages/models/lib/cooler.js:22:12)
2019-08-13T00:29:18.880380965Z       at Object.status (/srv/export/node_modules/@fraction/oasis/src/pages/models/meta.js:19:19)
2019-08-13T00:29:18.880392648Z       at process._tickCallback (internal/process/next_tick.js:68:7)

Error: stream is closed

When opening oasis from systemctl --user start oasis, it fails. manually running it is fine I think.

What version of this package are you using?
@latest

What operating system, Node.js, and npm version?
debian testing, node v12.14.0, npm 6.13.4

What happened?
I cannot view localhost:4515 - this is the error:

Error: stream is closed
    at /home/micro/.config/npm/lib/node_modules/@fraction/oasis/node_modules/muxrpc/index.js:45:25
    at remoteCall (/home/micro/.config/npm/lib/node_modules/@fraction/oasis/node_modules/muxrpc/remote-api.js:40:19)
    at obj.<computed> (/home/micro/.config/npm/lib/node_modules/@fraction/oasis/node_modules/muxrpc/remote-api.js:25:18)
    at /home/micro/.config/npm/lib/node_modules/@fraction/oasis/src/pages/models/lib/cooler.js:71:15
    at new Promise (<anonymous>)
    at Object.read (/home/micro/.config/npm/lib/node_modules/@fraction/oasis/src/pages/models/lib/cooler.js:70:12)
    at Object.popular (/home/micro/.config/npm/lib/node_modules/@fraction/oasis/src/pages/models/post.js:438:33)
    at runMicrotasks (<anonymous>)
    at processTicksAndRejections (internal/process/task_queues.js:93:5)
    at async publicPopularPage (/home/micro/.config/npm/lib/node_modules/@fraction/oasis/src/pages/public-popular.js:8:20)

What did you expect to happen?
to be able to see oasis

Are you willing to submit a pull request to fix this bug?
yes

Key not found in database [@C/zyw6xOd/QIcTLuZKZcrMoMmTwMfQs0u0rWEhNksgw=.ed25519,31]

What version of this package are you using? 2.1.2

What operating system, Node.js, and npm version? N/A

What happened?

could not retrive msg: Error [NotFoundError]: Key not found in database [@C/zyw6xOd/QIcTLuZKZcrMoMmTwMfQs0u0rWEhNksgw=.ed25519,31]
    at /home/christianbundy/src/oasis/node_modules/level-packager/node_modules/levelup/lib/levelup.js:169:15
    at /home/christianbundy/src/oasis/node_modules/encoding-down/index.js:50:21

๐Ÿคทโ€โ™‚๏ธ

$ npm ls levelup
@fraction/[email protected] /home/christianbundy/src/oasis
โ””โ”€โ”ฌ @fraction/[email protected]
  โ”œโ”€โ”ฌ [email protected]
  โ”‚ โ””โ”€โ”ฌ [email protected]
  โ”‚   โ””โ”€โ”ฌ [email protected]
  โ”‚     โ””โ”€โ”€ [email protected] 
  โ””โ”€โ”ฌ [email protected]
    โ””โ”€โ”ฌ [email protected]
      โ””โ”€โ”€ [email protected]

Looks like an ssb-blobs thing, but I don't know why it'd be looking for a feed ID in the database or which page is doing this.

What did you expect to happen?

No error.

Are you willing to submit a pull request to fix this bug?

Yes.

Don't show strangers in the main feeds

What's the problem you want to solve?
The Latest and Popular views seem to show everyone in my local database even if I'm not following them. I'm usually only interested in threads started by, or participated in, by people I directly follow.

Is there a solution you'd like to recommend?
Small scale solution: limit those views to people I follow.

Here's the query for Latest. I don't know how to filter it by people I'm following (easier) or comments on threads started by people I'm following (trickier)

Large scale solution: If I was redesigning the navbar from scratch I would make the Gradient of Intimacy the first choice in the hierarchy, with filter options below it:

[Everyone] [People you follow] [Mutual friends] [PMs]
...their [x] Posts [ ] Comments [ ] Likes
...sort by: Latest / Popular today / Popular this week

posting messages

The approach I used in yap was to have a single POST http api that can create any new message type. I used qs module to parse the query strings so that you can have a nested object, while still using a standard form that works even without javascript enabled.
an app must create a form for the particular messages they create.

This means the application platform is mostly read-only. I hope this will make testing easier.

Public viewer

What's the problem you want to solved? It's fun to run a pub + viewer but hard to do with Oasis. I have a branch called public, but it's not up-to-date with master.

Is there a solution you'd like to recommend? Maybe we should have support for Oasis as a public viewer? Would anyone want to use this?

Let's have a development process

What's the problem you want to solved? Learning a development process is hard work and it's easier when we can outline our needs more explicitly. It would be great to have a development process in this app (that I'd love to also add to SSB-CLI and friends).

Is there a solution you'd like to recommend? Since reading about the Collective Code Construction Contract I've been really itching to try it out. There's more info about it here, but the gist is "patches should solve problems and pass tests, maintainers should merge all correct patches ASAP after review for correctness only". I don't want to be a source of truth for this module and it's important to me that I'm not a bottleneck.

The only changes to C4 that I'd propose:

A patch commit message MUST consist of a single short (less than 50 characters) line stating the problem ("Problem: ...") being solved, followed by a blank line and then the proposed solution ("Solution: ...").

Commits in this format would be rad, but I can't imagine telling someone to amend their commit to follow this format. I think I'd like for "MUST" to be replaced with "SHOULD".

The project SHALL NOT use topic branches for any reason. Personal forks MAY use topic branches.

In my experience the project repository is a very convenient place to push your topic branches. I'd be comfortable removing this rule.

Maintainers SHOULD NOT merge their own patches except in exceptional cases, such as non-responsiveness from other Maintainers for an extended period (more than 1-2 days).

I don't know about this one, to be honest. It's probably fine if you have a bunch of hyper-active maintainers, but right now I think this would mean that I'd be merging lots of my own PRs.

cc: @jedahan @trashhalo @cinnamon-bun @stripedpajamas @mycognosist @aadilayub

Cannot read property 'readFile' of undefined

What version of this package are you using?
2.9.10

What operating system, Node.js, and npm version?
Debian: 9.11
Node: 8.9.4
npm: 6.13.4

What happened?
After running oasis, an error is thrown and the console output stops at Retrying connection to own server. The same error is thrown if I try running oasis with a Scuttlebutt server already running. The error is: Cannot read property 'readFile' of undefined. The full output is as follows:

oasis
(node:8086) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): TypeError: Cannot read property 'readFile' of undefined
  oasis Initial connection attempt failed +0ms
  oasis Starting Scuttlebutt server +1ms
ssb-friends: stream legacy api used
  oasis Retrying connection to own server +4s

What did you expect to happen?
Deployment of the oasis web app.

Are you willing to submit a pull request to fix this bug?
If I were able to identify and fix the problem, sure. I can see that the readFile operation occurs in index.js but I'm not sure where path is defined.

Thanks for your time and effort, @christianbundy

Automatic mention when replying to yourself

What version of this package are you using? 2.6.8

What operating system, Node.js, and npm version? N/A

What happened? Replying to self auto-inserts mention.

What did you expect to happen? No mention when replying to self.

Are you willing to submit a pull request to fix this bug? Yes.

Error: Expected width, height, channels and background to create a new input image

What version of this package are you using? 2.1.0

What operating system, Node.js, and npm version? N/A

What happened?

(node:12184) UnhandledPromiseRejectionWarning: Error: Expected width, height, channels and background to create a new input image
    at Sharp._createInputDescriptor (/home/christianbundy/src/oasis/node_modules/sharp/lib/input.js:96:15)
    at new Sharp (/home/christianbundy/src/oasis/node_modules/sharp/lib/constructor.js:225:29)
    at Sharp (/home/christianbundy/src/oasis/node_modules/sharp/lib/constructor.js:106:12)
    at /home/christianbundy/src/oasis/src/pages/blob.js:18:11
    at runMicrotasks (<anonymous>)
    at processTicksAndRejections (internal/process/task_queues.js:93:5)
(node:12184) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 5)

What did you expect to happen?

No error.

Are you willing to submit a pull request to fix this bug?

Yes.

Show Markdown preview before submitting post or comment

What's the problem you want to solved?
I want to know my Markdown works before I post it. It's also nice to be prompted to re-read my message before posting it, for typos and to encourage reflection.

This also reduces the need for editable messages #64

Is there a solution you'd like to recommend?

  1. Change the "Submit" button to "Preview"
  2. Clicking Preview reloads the page, preserving the text in the input box, and adds a new preview box below it with rendered markdown and a Submit button. Users can keep writing/editing and hit Preview again, or can Submit.

Or we could go to a new screen showing just the editbox and preview, but I think users often refer back to the thread as they write.

I'd vote for making people Preview before they can Submit, because I think this extra moment of reflection reduces flamewars.

oasis Error: could not connect to sbot

Seems like this only happens the first time you start the server?

  oasis Listening on http://localhost:3000/ +0ms
  oasis Initial connection attempt failed +0ms
  oasis Starting Scuttlebutt server +0ms
ssb-friends: stream legacy api used
  oasis Error: could not connect to sbot
  oasis     at /home/christianbundy/.config/yarn/global/node_modules/ssb-client/client.js:70:23
  oasis     at next (/home/christianbundy/.config/yarn/global/node_modules/multiserver/compose.js:24:14)
  oasis     at /home/christianbundy/.config/yarn/global/node_modules/multiserver/compose.js:34:9
  oasis     at _cb (/home/christianbundy/.config/yarn/global/node_modules/multiserver/plugins/shs.js:28:20)
  oasis     at /home/christianbundy/.config/yarn/global/node_modules/secret-handshake/protocol.js:118:22
  oasis     at /home/christianbundy/.config/yarn/global/node_modules/pull-handshake/index.js:10:5
  oasis     at /home/christianbundy/.config/yarn/global/node_modules/pull-handshake/index.js:23:13
  oasis     at callback (/home/christianbundy/.config/yarn/global/node_modules/pull-pushable/index.js:81:7)
  oasis     at drain (/home/christianbundy/.config/yarn/global/node_modules/pull-pushable/index.js:68:39)
  oasis   Error: shs.client: server hung up when we sent hello (phase 3).
  oasis Possibly we dailed a wrong number, or the server does not wish to talk to us.
  oasis     at abort (/home/christianbundy/.config/yarn/global/node_modules/secret-handshake/protocol.js:37:45)
  oasis     at Object.cb (/home/christianbundy/.config/yarn/global/node_modules/secret-handshake/protocol.js:52:26)
  oasis     at drain (/home/christianbundy/.config/yarn/global/node_modules/pull-reader/index.js:43:23)
  oasis   Error: stream ended with:64 but wanted:80
  oasis     at drain (/home/christianbundy/.config/yarn/global/node_modules/pull-reader/index.js:43:26)
  oasis     at /home/christianbundy/.config/yarn/global/node_modules/pull-reader/index.js:63:18
  oasis     at /home/christianbundy/.config/yarn/global/node_modules/pull-reader/index.js:20:7
  oasis     at drain (/home/christianbundy/.config/yarn/global/node_modules/stream-to-pull-stream/index.js:126:18)
  oasis     at Socket.<anonymous> (/home/christianbundy/.config/yarn/global/node_modules/stream-to-pull-stream/index.js:147:5)
  oasis     at Socket.emit (events.js:203:15)
  oasis     at TCP._handle.close (net.js:606:12) +6s
  oasis Retrying connection to own server +3s

  TypeError: Cannot read property 'read' of undefined
      at Promise.all.messages.map (/home/christianbundy/.config/yarn/global/node_modules/@fraction/oasis/src/pages/models/post.js:27:59)
      at Array.map (<anonymous>)
      at transform (/home/christianbundy/.config/yarn/global/node_modules/@fraction/oasis/src/pages/models/post.js:10:69)
      at pull.collect (/home/christianbundy/.config/yarn/global/node_modules/@fraction/oasis/src/pages/models/post.js:188:19)
      at /home/christianbundy/.config/yarn/global/node_modules/pull-stream/sinks/reduce.js:10:5
      at /home/christianbundy/.config/yarn/global/node_modules/pull-stream/sinks/drain.js:20:24
      at PacketStreamSubstream.weird.read (/home/christianbundy/.config/yarn/global/node_modules/muxrpc/pull-weird.js:33:7)
      at PacketStream._onstream (/home/christianbundy/.config/yarn/global/node_modules/packet-stream/index.js:200:12)
      at PacketStream.write (/home/christianbundy/.config/yarn/global/node_modules/packet-stream/index.js:135:41)
      at /home/christianbundy/.config/yarn/global/node_modules/muxrpc/pull-weird.js:56:15


  TypeError: Cannot read property 'read' of undefined
      at Promise.all.messages.map (/home/christianbundy/.config/yarn/global/node_modules/@fraction/oasis/src/pages/models/post.js:27:59)
      at Array.map (<anonymous>)
      at transform (/home/christianbundy/.config/yarn/global/node_modules/@fraction/oasis/src/pages/models/post.js:10:69)
      at pull.collect (/home/christianbundy/.config/yarn/global/node_modules/@fraction/oasis/src/pages/models/post.js:188:19)
      at /home/christianbundy/.config/yarn/global/node_modules/pull-stream/sinks/reduce.js:10:5
      at /home/christianbundy/.config/yarn/global/node_modules/pull-stream/sinks/drain.js:20:24
      at PacketStreamSubstream.weird.read (/home/christianbundy/.config/yarn/global/node_modules/muxrpc/pull-weird.js:33:7)
      at PacketStream._onstream (/home/christianbundy/.config/yarn/global/node_modules/packet-stream/index.js:200:12)
      at PacketStream.write (/home/christianbundy/.config/yarn/global/node_modules/packet-stream/index.js:135:41)
      at /home/christianbundy/.config/yarn/global/node_modules/muxrpc/pull-weird.js:56:15

Empty blob crashes server

What version of this package are you using? 2.9.2

What operating system, Node.js, and npm version? N/A

What happened? Tried to open /blob/ for &47DEQpj8HBSa+/TImW+5JCeuQeRkm5NMpJWZG3hSuFU=.sha256 and the server crashed

What did you expect to happen? Empty page

Are you willing to submit a pull request to fix this bug? Sure.

Can't click images to view them

Images have an href of

http://localhost:3000/&Ft9HIgL08yuQEKKFGcermmb5nRxv/HQnw+t0vTYCb/g=.sha256

...which gives a Not Found when you click on them.

The image src points to a working URL at
http://localhost:8989/blobs/get/%26Ft9HIgL08yuQEKKFGcermmb5nRxv%2FHQnw%2Bt0vTYCb%2Fg%3D.sha256

That's the same port and URL format that you get from Patchwork if you right-click and Copy Image URL. Is there some kind of local blob server running on port 8989 next to the Oasis webserver at 3000?

Parent click

What version of this package are you using?
2.5.3

What operating system, Node.js, and npm version?
Fedora 30,v10.16.3 and 6.10.2

What happened?

TypeError: isNestedReply is not a function
    at Promise (/home/kaotisk/.local/share/yarn/global/node_modules/@fraction/oasis/src/pages/models/post.js:334:13)
    at new Promise (<anonymous>)
    at getRootAncestor (/home/kaotisk/.local/share/yarn/global/node_modules/@fraction/oasis/src/pages/models/post.js:317:38)
    at Object.fromThread (/home/kaotisk/.local/share/yarn/global/node_modules/@fraction/oasis/src/pages/models/post.js:456:32)
    at process._tickCallback (internal/process/next_tick.js:68:7)

What did you expect to happen?
Open the parent of a post

Are you willing to submit a pull request to fix this bug?
Not sure I can help... I understand that somewhere, ( possibly at @fraction/oasis/src/pages/models/post.js:334:13 ) a function is expected but a promise is returned. Maybe it's even more complicated or simple but not the case I guess.

base16 themes

What version of this package are you using? 2.1.0

What problem do you want to solve? Building custom themes is fun but it isn't the main problem I'm interested in solving. I want to have good themes without reinventing anything.

What do you think is the correct solution to this problem? Adopt a well-known standard like base16 and provide a bunch of different themes.

Are you willing to submit a pull request to implement this change? Hell yep.

Post and like gives some errors

Browser:

Firefox Browser 72.0.1
Chromium Version 79.0.3945.79

What's the problem you want to solved?

I am getting some possibly linked errors when carrying out different actions such as publish and like. Some of the actions are carried out but not always. Haven't worked out a logic to that yet. Could also be linked to my initial issue #60.

http://localhost:3000/publish/

ReferenceError: URL is not defined
    at app.use (/usr/local/lib/node_modules/@fraction/oasis/src/http.js:53:26)
    at <anonymous>
    at process._tickCallback (internal/process/next_tick.js:188:7)

http://localhost:3000/like/foobar

ReferenceError: URL is not defined
    at router.param.param.param.param.get.get.get.get.get.get.get.get.get.get.get.get.get.get.get.get.get.get.get.post.post.post.post.post.post (/usr/local/lib/node_modules/@fraction/oasis/src/index.js:480:21)
    at dispatch (/usr/local/lib/node_modules/@fraction/oasis/node_modules/koa-router/node_modules/koa-compose/index.js:44:32)
    at next (/usr/local/lib/node_modules/@fraction/oasis/node_modules/koa-router/node_modules/koa-compose/index.js:45:18)
    at /usr/local/lib/node_modules/@fraction/oasis/node_modules/koa-body/index.js:148:14
    at <anonymous>
    at process._tickCallback (internal/process/next_tick.js:188:7)

<title> of page is always just "Oasis" -- maybe include thread title

What's the problem you want to solved?
I like to open lots of Oasis tabs, and also bookmark them for later. But they all have the same page title, "Oasis".

Is there a solution you'd like to recommend?
For message or thread views, put the title of the message/thread in the <title>.

Extracting the message title isn't easy, but maybe:

  1. If there's any markdown headlines, use the first one of those
  2. Otherwise remove markdown image references in case the message starts with an image, then use the first line of text

RangeError: Invalid time value

What version of this package are you using?

2.1.0

What operating system, Node.js, and npm version?

N/A

What happened?

  RangeError: Invalid time value
      at Date.toISOString (<anonymous>)
      at /home/christianbundy/oasis/src/pages/models/post.js:90:63
      at runMicrotasks (<anonymous>)
      at processTicksAndRejections (internal/process/task_queues.js:93:5)
      at async Promise.all (index 0)
      at async Object.fromThread (/home/christianbundy/oasis/src/pages/models/post.js:392:25)
      at async threadPage (/home/christianbundy/oasis/src/pages/thread.js:9:20)
      at async /home/christianbundy/oasis/src/app.js:105:18
      at async /home/christianbundy/oasis/node_modules/koa-mount/index.js:52:26

What did you expect to happen?

No errors.

Are you willing to submit a pull request to fix this bug?

โœ”๏ธ

Conversation: Typescript

I'm interested in converting some code to Typescript. Thoughts?

pipe-labels

Labeling your types makes it possible to understand code by looking locally, in one file, instead of having to read the whole project and keep it all in your head at once.

For example when I wanted to add names to the peer list, I looked at code like this:
https://github.com/fraction/oasis/blob/master/src/views/index.js#L177

and had no idea what kind of thing a peer was or what properties it had. I ran it with a console.log to find out, but that only showed me some of the possible variations of peer objects according to who was online at that moment.

Personally I find lack of types to be the biggest challenge in understanding SSB code. It's a challenge to figure out which of the many modules are generating objects in the first place.

Upsides

  • Easier to understand code, for people who can read Typescript
  • Fewer bugs at runtime

Drawbacks

  • Contributors have to be able to read Typescript
  • Another dependency, another config file
  • Adds a build step (or use ts-node as a drop-in replacement for node which compiles for you)

There's also a middle path, adding types in comments within plain Javascript files. This has its own different syntax that fewer people know, I think, but lets you run the code with no build step.

/** @type {string[]} */
const x = [];

I use TS in all my own projects and feel it helps a lot, but here the choice doesn't seem obvious. I'm not pushing for it, but if others are excited I can help.

Liking a post throws an error

What version of this package are you using?
2.9.1

What operating system, Node.js, and npm version?
Fedora 31, Node v12.13.1, npm 6.12.1

(I also have patchwork running in the background)

What happened?
I clicked "like" on a post, and got redirected to a page with this text:

Error: non-error thrown: {"message":"no async:tangle,branch","name":"Error","stack":"Error: no async:tangle,branch\n    at Object.localCall (/tmp/.mount_patchwzywQgP/resources/app.asar/node_modules/muxrpc/local-api.js:29:13)\n    at Object.<anonymous> (/tmp/.mount_patchwzywQgP/resources/app.asar/node_modules/muxrpc/local-api.js:37:22)\n    at Object.request (/tmp/.mount_patchwzywQgP/resources/app.asar/node_modules/muxrpc/stream.js:48:17)\n    at PacketStream._onrequest (/tmp/.mount_patchwzywQgP/resources/app.asar/node_modules/packet-stream/index.js:161:17)\n    at PacketStream.write (/tmp/.mount_patchwzywQgP/resources/app.asar/node_modules/packet-stream/index.js:134:41)\n    at /tmp/.mount_patchwzywQgP/resources/app.asar/node_modules/muxrpc/pull-weird.js:56:15\n    at /tmp/.mount_patchwzywQgP/resources/app.asar/node_modules/pull-stream/sinks/drain.js:24:37\n    at /tmp/.mount_patchwzywQgP/resources/app.asar/node_modules/pull-goodbye/node_modules/pull-stream/throughs/filter.js:17:11\n    at Object.cb (/tmp/.mount_patchwzywQgP/resources/app.asar/node_modules/packet-stream-codec/index.js:111:11)\n    at drain (/tmp/.mount_patchwzywQgP/resources/app.asar/node_modules/pull-reader/index.js:39:14)"}
    at Object.onerror (/home/aadil/.npm-global/lib/node_modules/@fraction/oasis/node_modules/koa/lib/context.js:113:40)
    at onerror (/home/aadil/.npm-global/lib/node_modules/@fraction/oasis/node_modules/koa/lib/application.js:163:32)
    at runMicrotasks (<anonymous>)
    at processTicksAndRejections (internal/process/task_queues.js:93:5)

What did you expect to happen?
The post gets liked, maybe the heart icon animates or turns pink

Are you willing to submit a pull request to fix this bug?
no :(

Move <label> and <progress> into a block eleent

What version of this package are you using?

latest

What problem do you want to solve?

In text browsers like Lynx the progress bars look like crap:

Indexes

   last279362059keys563641188clock279343589time563657825feed563641188backlinks--oaWWDs8g426606027contacts2279362059links2343587769query5
   11704536

Peers

  Local

     * @gTsBPQbdSd763h0qoZsBjPlgWbhKKmMFW8kmTv/XrV8=.ed25519
     * @Qp1j7Jm+F+SuJnJqBDOp1FeGOEBRsfHiTHNVyvKBDvI=.ed25519

What do you think is the correct solution to this problem?

Moving the <label> and <progress> elements into a block element. Maybe <div>?

Are you willing to submit a pull request to implement this change?

Yes!

Can't see own posts on hashtag page

What version of this package are you using? 2.5.3

What operating system, Node.js, and npm version? N/A

What happened? Can't see own posts on hashtag page.

What did you expect to happen? Should be able to see your own posts.

Are you willing to submit a pull request to fix this bug? Yes.

Easier @mentions

What's the problem you want to solved? It's hard to @mention people and it's a pain to have to go to someone's profile and copy their Markdown mention link.

Is there a solution you'd like to recommend? I talked to @soapdog today and he had the wonderful idea of using a dropdown (or maybe multiple drop-downs for close friends/1 hop/2 hops etc?) with multiple selections.

identities, language, etc

I think it's important that new clients embrace new ssb abilities from the get go. For example, we can now do multiple identities quite easily (using ssb-identities) but most clients assume that there is only a single identity.

In yap, I implemented this using cookies - the reason being that it makes the url generic - you could share a link if you wanted to, and it would make sense without knowing the selected user.
(not that you really want to be able to share links, but it seemed like clean design)

I planned the same approach for language. basically, you do a post, which sets the cookie. you just need an ordinary form on the front end.

What do you think? I'm keen to have a back end that can work with oasis and yap.

npm ERR! premature close

What version of this package are you using?

Whichever version is available when saying npm install -g @fraction/oasis or doing a npm install in git master.

What operating system, Node.js, and npm version?

What happened?

$ npm install
npm WARN deprecated [email protected]: `json-parser` is deprecated. Please use `comment-json` instead
npm ERR! premature close

npm ERR! A complete log of this run can be found in:
npm ERR!     ~/.npm/_logs/$DATETIME-debug.log

What did you expect to happen?

A successful @fraction/oasis install.

Are you willing to submit a pull request to fix this bug?

I don't speak nodejs and I ain't got no clue why this is failing, so: no.


๐Ÿ“Ž debug.log

Message references are showing in thread view

If message B is a new thread that links to message A, then message B should not show up as a post in the thread of message A. It should probably show as a little inline link, like "B referenced this post", but it shouldn't show in its entirety.

Screenshot in readme

What's the problem you want to solved? I always really enjoy seeing how software looks before I install it. I was thinking that the web demo would be good enough, but @cblgh asked for a screenshot of Oasis in the readme so that's probably a good idea.

Is there a solution you'd like to recommend? Maybe one of us should take a screenshot and put it in the readme? We should probably respect publicWebHosting and be sure not to capture any information that the author hasn't said they're okay with sharing. Bonus points for a [slow] animated GIF of some of the themes?

Can't unlike posts

What version of this package are you using?
2.9.7

What happened?
The like button adds likes but doesn't remove a like from a post that you've already liked. Looking at the HTML, the button always submits a voteValue of 1.

What did you expect to happen?
If you've previously liked a post, maybe it should submit a voteValue of 0?

Are you willing to submit a pull request to fix this bug?
Nope โค๏ธ

I am guessing it needs to query each post to know if you're amongst the likers?

What is the intended use case of Oasis?

The readme is alittle unclear on where Oasis fits into the ecosystem.

  • Is it meant to be run locally as an alternative to patchwork?
  • Is it meant to be hosted and used by multiple users?

I think clarifying this would help contributors make more meaningful commits.

Add systemd postinstall script

What version of this package are you using?
@latest

What problem do you want to solve?
Make it easier to run on boot if people want to.

What do you think is the correct solution to this problem?
Create a postinstall script for npm, something like

test -f /run/systemd/system || return
test "$XDG_CONFIG_HOME" || export XDG_CONFIG_HOME=$HOME/.config
export SYSTEMD_USER_HOME="$XDG_CONFIG_HOME"/systemd/user
mkdir -p "$SYSTEMD_USER_HOME"
cp contrib/oasis.service "$SYSTEMD_USER_HOME"/
echo "we copied a systemd service to $SYSTEMD_USER_HOME"
echo "if you'd like to enable oasis on user login, run:"
echo "\n\t systemctl --user enable oasis"

Are you willing to submit a pull request to implement this change?
ya

ssb server won't start

What version of this package are you using?
2.9.1

What operating system, Node.js, and npm version?
Fedora 31, node v12.13.1, npm 6.12.1

What happened?
I ran oasis --open, a browser tab opened at localhost:3000, and I got a "Server Not Found" error:

image

In the terminal, I got this output:

$ oasis --open
  oasis Initial connection attempt failed +0ms
  oasis Starting Scuttlebutt server +1ms
ssb-friends: stream legacy api used
  oasis Listening on http://localhost:3000/ +0ms
  oasis Retrying connection to own server +2s
/home/aadil/.npm-global/lib/node_modules/@fraction/oasis/src/pages/models/post.js:414
            .reduce(
             ^

TypeError: Reduce of empty array with no initial value
    at Array.reduce (<anonymous>)
    at /home/aadil/.npm-global/lib/node_modules/@fraction/oasis/src/pages/models/post.js:414:14
    at /home/aadil/.npm-global/lib/node_modules/@fraction/oasis/node_modules/pull-stream/sinks/reduce.js:10:5
    at /home/aadil/.npm-global/lib/node_modules/@fraction/oasis/node_modules/pull-stream/sinks/drain.js:20:24
    at /home/aadil/.npm-global/lib/node_modules/@fraction/oasis/node_modules/pull-stream/throughs/filter.js:17:11
    at PacketStreamSubstream.weird.read (/home/aadil/.npm-global/lib/node_modules/@fraction/oasis/node_modules/muxrpc/pull-weird.js:33:7)
    at PacketStream._onstream (/home/aadil/.npm-global/lib/node_modules/@fraction/oasis/node_modules/packet-stream/index.js:200:12)
    at PacketStream.write (/home/aadil/.npm-global/lib/node_modules/@fraction/oasis/node_modules/packet-stream/index.js:135:41)
    at /home/aadil/.npm-global/lib/node_modules/@fraction/oasis/node_modules/muxrpc/pull-weird.js:56:15
    at /home/aadil/.npm-global/lib/node_modules/@fraction/oasis/node_modules/pull-stream/sinks/drain.js:24:37

What did you expect to happen?
A browser tab opens at localhost:3000, I can see my scuttlebutt feed

Are you willing to submit a pull request to fix this bug?
No

Move <nav> elements to <ul>

What version of this package are you using?

latest

What problem do you want to solve?

Currently <nav> is just a bunch of links. Each link should be inside of an <li> in an <ul> element.

What do you think is the correct solution to this problem?

<ul>
  <li><a>A</a></li>
  <li><a>B</a></li>
</ul>

Are you willing to submit a pull request to implement this change?

Yes.

Feature request: --offline mode

What version of this package are you using?
2.9.2

What problem do you want to solve?
Sometimes I want to read SSB without connecting to the network, for privacy reasons or to save bandwidth. But I don't want to disconnect my whole computer because I'm doing other things on the network.

What do you think is the correct solution to this problem?
I'd like to run SSB in offline mode to prevent it from sending any packets to the internet.

Extra credit would be to have separate flags for local network peer finding vs. talking to pubs.

(This would only impact the SSB server that Oasis runs for itself, not ones launched by other apps like Patchwork)

Are you willing to submit a pull request to implement this change?
Maybe. Where can we tell the server to not touch the network? Would we remove some plugins from the server, in flotilla?
https://github.com/fraction/flotilla/blob/master/index.js

Use default scroll bar in Firefox

Browser

Firefox Browser - 72.0.2
Chromium Version - 79.0.3945.79

What's the problem you want to solved?

In Firefox, Oasis seems to be using a scroll bar that looks quite different to the default Firefox scroll bar. This makes it difficult to scroll using a mouse or on a touchscreen.

This doesn't happen in Chromium, Oasis's scroll bar remains the default.

These are going to be some very thin images:

Default Firefox scroll bar

Screenshot from 2020-01-26 21-47-12

Scrollbar of Oasis in Firefox (Nord theme)

Screenshot from 2020-01-26 21-47-25

common-good only installs with recent version of npm - how to fix "npm ERR! Invalid dependency type requested: alias"

Starting at commit 393f7ef "Update Common-Good to fix Windows problem" I was unable to run npm install.

npm ERR! Invalid dependency type requested: alias

I had npm 6.3.0 and node v10.8.0 on OSX 10.11.6.

Apparently a dependency somewhere within common-good is using "alias" in package.json, which is a yarn feature that only became supported by npm 6.9.0 released in March 2019. Unfortunately the npm log didn't specify which package was causing the problem.

I updated npm using npm install -g npm@latest. Now with npm 6.13.6, it all works.

Reporting this in case anyone else runs into it.

Patchfox feels much faster

What's the problem you want to solved?
I thought with the simplicity of our client being just html, css, and links, it would be hella fast.

Is there a solution you'd like to recommend?
Maybe we can start writing performance tests, and flamegraphs and all that.

Mentions sorted by asserted timestamp

What version of this package are you using? 2.7.1

What operating system, Node.js, and npm version? N/A

What happened? Mentions are sorted by asserted timestamp.

What did you expect to happen? Mentions should be sorted by received timestamp.

Are you willing to submit a pull request to fix this bug? Yep.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.