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

Hard to get started #286

Open
haf opened this issue Jul 12, 2021 · 2 comments
Open

Hard to get started #286

haf opened this issue Jul 12, 2021 · 2 comments

Comments

@haf
Copy link

haf commented Jul 12, 2021

Hi,

So far I've spent about six hours trying to get started with a single sample.

I'm trying to run a sample and integrate Textile with my p2p outdoor app, however I can't get it running properly with react-native from the samples folder.

To start with there are many broken links; from blog entries from 2018 on textile.io as well as from the actual docs. E.g. many links are linking to archived github repositories and the old thread library. Some docs mention that the chat sample has been blocked on the rewrite of the threads code (which now seems done, but the chat sample is still gone).

As for trying the sample react-native-hub-app, it doesn't install when following the instructions:

npm i
npm run ios # or run android

For ios (which is my main target) it crashes with "Missing threadsdb_app.xcworkspace" from xcode. After doing a cd threadsdb_app.xcworkspace/ios && sudo gem install cocoapods && pod install && cd .. && npm run ios it still crashes. After following the deprecated version error message (seems v8 is deprecated: CocoaPods/CocoaPods#9884 — and applying a workaround / overwriting the sublibraries' target — the build STILL fails.

On top of this, I find the docs unclear about the separation between the hub and the standalone / self-hosted software. I'm sure I could read my way to it (hasn't passively done so far in six hours and counting, though, trying to run your sample); but it would be nicer to allow a choice:

  1. Create an account here, at our hub, get 5 GiB for free, or;
  2. Run this docker compose up with docker-compose.yml file and ensure you specify --api http://127.0.0.1:9000/v1/hub when interacting with the CLI
  3. Alternatively; here's a kustomize-ready folder you can run on docker-desktop with Kubernetes

I see p2p for my use-case as an extension of the wearable computing concept; therefore it's a requirement for me to be able to build and run this sort of library outside of a desktop browser.

The documentation could also use an overview page that's not as verbose but rather more visual; i.e. showing with 2-3 diagrams;

  1. The interactions between clients/peers/hub/server, IPFS nodes, other blockchains and how pinning works
  2. A sequence diagram of the calls that is in checklist.tsx in the react-native app sample — in particular focusing on tying the different concepts together coherently; Database, Thread, User, Account, Organisation

Furthermore, when only following your examples (albeit with Expo), you get into this issue when trying to loading the app:

If you are sure the module exists, try these steps:
 1. Clear watchman watches: watchman watch-del-all
 2. Delete node_modules and run yarn install
 3. Reset Metro's cache: yarn start --reset-cache
 4. Remove the cache: rm -rf /tmp/metro-*
  22 | module.exports = global.StreamModule = Stream
  23 |
> 24 | var EE = require('events').EventEmitter;
     |                   ^
  25 | var inherits = require('inherits');
  26 |
  27 | inherits(Stream, EE);

Either it's because I'm using Expo or it might be something else. Using Expo has its upsides; like online code-push for example, so maybe this might be a good target for a sample?

I realise this is written mostly as a wish list; but the one key take-away should be:

Please make your examples work.

@haf
Copy link
Author

haf commented Jul 21, 2021

This may be due to lack of RAM when compiling... I've tried this multiple times with one laptop, and it didn't work, but with another laptop it did. I'm going to close this as I zero in on the problem.

@haf haf closed this as completed Jul 21, 2021
@haf
Copy link
Author

haf commented Jul 23, 2021

Ok, so back to where I was; installing textile from scratch works, but not following the samples (react-native-hub-app)

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] ios: `react-native run-ios`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] ios script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

@haf haf reopened this Jul 23, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant