Token

The Token Developer Hub

Welcome to the Token developer hub. You'll find comprehensive guides and documentation to help you start working with Token as quickly as possible, as well as support if you get stuck. Let's jump right in!

Get Started    
Ask A Question

Questions

3
ANSWERED

lnvalid Timestamp

I'm setting trying to set up the demo cloned app, and I keep getting this error: ```SEVERE: Failed to register with ID service: 400 - {"errors": [{"id": "invalid_timestamp", "message": "The difference between the timestamp and the current time is too large"}]}``` Full terminal: ``` $ docker-compose up Starting myapp_redis_1 Starting myapp_postgres_1 Starting myapp_headless-client_1 Starting myapp_bot_1 Attaching to myapp_redis_1, myapp_postgres_1, myapp_bot_1, myapp_headless-client_1 redis_1 | _._ redis_1 | _.-``__ ''-._ redis_1 | _.-`` `. `_. ''-._ Redis 3.2.9 (00000000/0) 64 bit redis_1 | .-`` .-```. ```\/ _.,_ ''-._ redis_1 | ( ' , .-` | `, ) Running in standalone mode redis_1 | |`-._`-...-` __...-.``-._|'` _.-'| Port: 6379 redis_1 | | `-._ `._ / _.-' | PID: 1 redis_1 | `-._ `-._ `-./ _.-' _.-' postgres_1 | LOG: database system was shut down at 2017-05-28 16:35:52 UTC redis_1 | |`-._`-._ `-.__.-' _.-'_.-'| redis_1 | | `-._`-._ _.-'_.-' | http://redis.io redis_1 | `-._ `-._`-.__.-'_.-' _.-' redis_1 | |`-._`-._ `-.__.-' _.-'_.-'| redis_1 | | `-._`-._ _.-'_.-' | redis_1 | `-._ `-._`-.__.-'_.-' _.-' postgres_1 | LOG: MultiXact member wraparound protections are now enabled redis_1 | `-._ `-.__.-' _.-' redis_1 | `-._ _.-' redis_1 | `-.__.-' redis_1 | postgres_1 | LOG: database system is ready to accept connections redis_1 | 1:M 28 May 16:37:04.013 # WARNING: The TCP backlog setting of 511 cannot be enforced because /proc/sys/net/core/somaxconn is set to the lower value of 128. postgres_1 | LOG: autovacuum launcher started redis_1 | 1:M 28 May 16:37:04.013 # Server started, Redis version 3.2.9 redis_1 | 1:M 28 May 16:37:04.013 # WARNING you have Transparent Huge Pages (THP) support enabled in your kernel. This will create latency and memory usage issues with Redis. To fix this issue run the command 'echo never > /sys/kernel/mm/transparent_hugepage/enabled' as root, and add it to your /etc/rc.local in order to retain the setting after a reboot. Redis must be restarted after THP is disabled. redis_1 | 1:M 28 May 16:37:04.013 * The server is now ready to accept connections on port 6379 bot_1 | [nodemon] 1.11.0 bot_1 | [nodemon] to restart at any time, enter `rs` bot_1 | [nodemon] watching: *.* bot_1 | [nodemon] starting `node src/bot.js config.yml` bot_1 | Fiat: Fetching rates bot_1 | Address: 0x79caafe0b119f5625e6dbc5290d9ac8b65127660 headless-client_1 | [email protected]b1d7fff headless-client_1 | [main] INFO org.flywaydb.core.internal.util.VersionPrinter - Flyway 4.1.0 by Boxfuse headless-client_1 | [main] INFO org.flywaydb.core.internal.dbsupport.DbSupportFactory - Database: jdbc:postgresql://postgres:5432/token (PostgreSQL 9.6) headless-client_1 | [main] INFO org.flywaydb.core.internal.command.DbValidate - Successfully validated 1 migration (execution time 00:00.027s) headless-client_1 | [main] INFO org.flywaydb.core.internal.command.DbMigrate - Current version of schema "public": 1 headless-client_1 | [main] INFO org.flywaydb.core.internal.command.DbMigrate - Schema "public" is up to date. No migration necessary. headless-client_1 | [main] INFO org.bitcoinj.crypto.MnemonicCode - PBKDF2 took 63.41 ms headless-client_1 | [main] WARN org.bitcoinj.core.Context - Implicitly creating context. This is a migration step and this message will eventually go away. headless-client_1 | [main] INFO org.bitcoinj.core.Context - Creating bitcoinj 0.14.3 context. headless-client_1 | [main] INFO org.bitcoinj.wallet.DeterministicKeyChain - 133 keys needed for M/0H/0 = 0 issued + 100 lookahead size + 33 lookahead threshold - 0 num children headless-client_1 | [main] INFO org.bitcoinj.wallet.DeterministicKeyChain - Took 62.98 ms headless-client_1 | [main] INFO org.bitcoinj.wallet.DeterministicKeyChain - 133 keys needed for M/0H/1 = 0 issued + 100 lookahead size + 33 lookahead threshold - 0 num children headless-client_1 | [main] INFO org.bitcoinj.wallet.DeterministicKeyChain - Took 32.51 ms headless-client_1 | ID Address: 0x79caafe0b119f5625e6dbc5290d9ac8b65127660 headless-client_1 | Wallet Address: 0x0b37ae667a8e2eb721405fa4b53134ecc6d1ce0b headless-client_1 | Trust Store Name: token.store bot_1 | Fiat: Rates initialized successfully headless-client_1 | May 28, 2017 4:37:08 PM com.bakkenbaeck.token.headless.TokenHeadlessClient main headless-client_1 | SEVERE: Failed to register with ID service: 400 - {"errors": [{"id": "invalid_timestamp", "message": "The difference between the timestamp and the current time is too large"}]} myapp_headless-client_1 exited with code 0 ```

Posted by eyezick 25 days ago

4
ANSWERED

Unable to find my Bot App

I'm trying to create my Token App by following the instructions from http://developers.tokenbrowser.com/docs/creating-a-token-app. On the step 4 ("Connect to your app") I can't find my new app. My docker-compose.yml: version: '2' services: headless-client: build: dependencies/headless-client links: - redis - postgres environment: &environment - TOKEN_APP_ID=0x754f6748c9ce59ac8bfd56358d14b38bafb3020c - TOKEN_APP_PAYMENT_ADDRESS=0x88192dec7ba96df5fc3842c9739df0aa9b2875ef - TOKEN_APP_USERNAME=mdtestapp50222 - TOKEN_APP_NAME=mdtestapp50223 - TOKEN_APP_AVATAR= - TOKEN_APP_SEED='control fringe term wasp east account exotic tired relax bike comfort offer' - REDIS_URL=redis://h:[email protected]:6379 - DATABASE_URL=postgres://token:[email protected]:5432/token volumes: - ./config/docker.yml:/usr/src/headless-client/config.yml - ./attachments:/usr/src/headless-client/attachments bot: build: . links: - redis - postgres environment: *environment volumes: - ./config/docker.yml:/usr/src/bot/config.yml - ./src:/usr/src/bot/src redis: build: dependencies/redis ports: - 6379 postgres: image: postgres:9.6 ports: - 15432 environment: - POSTGRES_PASSWORD=va5uOdJBqu2dZ1 - POSTGRES_USER=token - POSTGRES_DB=token Output from console, after "docker-compose up" command: Creating network "mdtokenapp_default" with the default driver Building redis Step 1/3 : FROM redis ---> a858478874d1 Step 2/3 : COPY redis.conf /usr/local/etc/redis/redis.conf ---> Using cache ---> 3f77c819a5f7 Step 3/3 : CMD redis-server /usr/local/etc/redis/redis.conf ---> Using cache ---> ffbcc90eec86 Successfully built ffbcc90eec86 WARNING: Image for service redis was built because it did not already exist. To rebuild this image you must use `docker-compose build` or `docker-compose up --build`. Building bot Step 1/10 : FROM node:latest ---> 6c792d919591 Step 2/10 : RUN git config --global user.email [email protected]' ---> Using cache ---> 263daa8428ad Step 3/10 : RUN npm install -g nodemon ---> Using cache ---> 5554280d0b2f Step 4/10 : ADD package.json /tmp/package.json ---> Using cache ---> 9242efa1d311 Step 5/10 : RUN cd /tmp && npm install --unsafe-perm ---> Using cache ---> c314fb30c91f Step 6/10 : RUN mkdir -p /usr/src/bot && cp -a /tmp/node_modules /usr/src/bot/ ---> Using cache ---> 70f98a6741ef Step 7/10 : ADD src /usr/src/bot/src ---> Using cache ---> d120fe2c4498 Step 8/10 : ADD package.json /usr/src/bot/package.json ---> Using cache ---> a84b7e29c361 Step 9/10 : WORKDIR /usr/src/bot ---> Using cache ---> 0a466738bb78 Step 10/10 : CMD nodemon -L src/bot.js config.yml ---> Using cache ---> 51f8699d8b80 Successfully built 51f8699d8b80 WARNING: Image for service bot was built because it did not already exist. To rebuild this image you must use `docker-compose build` or `docker-compose up --build`. Building headless-client Step 1/7 : FROM openjdk:8 ---> ab0ecda9094c Step 2/7 : WORKDIR /usr/src/headless-client ---> Using cache ---> 9ad9280907f4 Step 3/7 : RUN git clone https://github.com/tokenbrowser/token-headless-client.git . ---> Using cache ---> d33bff6eaf94 Step 4/7 : RUN git fetch --tags ---> Using cache ---> 8f769bafbab2 Step 5/7 : RUN git checkout tags/v0.1.1 ---> Using cache ---> f4de3dfc7fc5 Step 6/7 : RUN ./gradlew TokenHeadlessClientCapsule ---> Using cache ---> 6543302182c7 Step 7/7 : CMD java -jar build/libs/token-headless-0.1.1-capsule.jar config.yml ---> Using cache ---> efe0a9c7a0e5 Successfully built efe0a9c7a0e5 WARNING: Image for service headless-client was built because it did not already exist. To rebuild this image you must use `docker-compose build` or `docker-compose up --build`. Creating mdtokenapp_postgres_1 Creating mdtokenapp_redis_1 Creating mdtokenapp_headless-client_1 Creating mdtokenapp_bot_1 Attaching to mdtokenapp_redis_1, mdtokenapp_postgres_1, mdtokenapp_headless-client_1, mdtokenapp_bot_1 redis_1 | _._ redis_1 | _.-``__ ''-._ redis_1 | _.-`` `. `_. ''-._ Redis 3.2.9 (00000000/0) 64 bit redis_1 | .-`` .-```. ```\/ _.,_ ''-._ redis_1 | ( ' , .-` | `, ) Running in standalone mode redis_1 | |`-._`-...-` __...-.``-._|'` _.-'| Port: 6379 redis_1 | | `-._ `._ / _.-' | PID: 1 redis_1 | `-._ `-._ `-./ _.-' _.-' postgres_1 | The files belonging to this database system will be owned by user "postgres". redis_1 | |`-._`-._ `-.__.-' _.-'_.-'| postgres_1 | This user must also own the server process. redis_1 | | `-._`-._ _.-'_.-' | http://redis.io redis_1 | `-._ `-._`-.__.-'_.-' _.-' redis_1 | |`-._`-._ `-.__.-' _.-'_.-'| redis_1 | | `-._`-._ _.-'_.-' | redis_1 | `-._ `-._`-.__.-'_.-' _.-' redis_1 | `-._ `-.__.-' _.-' redis_1 | `-._ _.-' redis_1 | `-.__.-' redis_1 | redis_1 | 1:M 27 May 11:03:30.315 # WARNING: The TCP backlog setting of 511 cannot be enforced because /proc/sys/net/core/somaxconn is set to the lower value of 128. postgres_1 | redis_1 | 1:M 27 May 11:03:30.318 # Server started, Redis version 3.2.9 postgres_1 | The database cluster will be initialized with locale "en_US.utf8". postgres_1 | The default database encoding has accordingly been set to "UTF8". postgres_1 | The default text search configuration will be set to "english". postgres_1 | postgres_1 | Data page checksums are disabled. postgres_1 | postgres_1 | fixing permissions on existing directory /var/lib/postgresql/data ... ok redis_1 | 1:M 27 May 11:03:30.319 # WARNING you have Transparent Huge Pages (THP) support enabled in your kernel. This will create latency and memory usage issues with Redis. To fix this issue run the command 'echo never > /sys/kernel/mm/transparent_hugepage/enabled' as root, and add it to your /etc/rc.local in order to retain the setting after a reboot. Redis must be restarted after THP is disabled. postgres_1 | creating subdirectories ... ok postgres_1 | selecting default max_connections ... 100 redis_1 | 1:M 27 May 11:03:30.320 * The server is now ready to accept connections on port 6379 postgres_1 | selecting default shared_buffers ... 128MB postgres_1 | selecting dynamic shared memory implementation ... posix postgres_1 | creating configuration files ... ok postgres_1 | running bootstrap script ... ok bot_1 | [nodemon] 1.11.0 bot_1 | [nodemon] to restart at any time, enter `rs` bot_1 | [nodemon] watching: *.* bot_1 | [nodemon] starting `node src/bot.js config.yml` postgres_1 | performing post-bootstrap initialization ... ok bot_1 | Fiat: Fetching rates bot_1 | Address: 0x754f6748c9ce59ac8bfd56358d14b38bafb3020c postgres_1 | syncing data to disk ... postgres_1 | WARNING: enabling "trust" authentication for local connections postgres_1 | You can change this by editing pg_hba.conf or using the option -A, or postgres_1 | --auth-local and --auth-host, the next time you run initdb. postgres_1 | ok postgres_1 | postgres_1 | Success. You can now start the database server using: postgres_1 | postgres_1 | pg_ctl -D /var/lib/postgresql/data -l logfile start postgres_1 | postgres_1 | waiting for server to start....LOG: database system was shut down at 2017-05-27 11:03:34 UTC postgres_1 | LOG: MultiXact member wraparound protections are now enabled postgres_1 | LOG: database system is ready to accept connections postgres_1 | LOG: autovacuum launcher started bot_1 | Fiat: Rates initialized successfully postgres_1 | done postgres_1 | server started postgres_1 | CREATE DATABASE postgres_1 | postgres_1 | CREATE ROLE postgres_1 | postgres_1 | postgres_1 | /usr/local/bin/docker-entrypoint.sh: ignoring /docker-entrypoint-initdb.d/* postgres_1 | postgres_1 | LOG: received fast shutdown request postgres_1 | LOG: aborting any active transactions postgres_1 | waiting for server to shut down....LOG: autovacuum launcher shutting down postgres_1 | LOG: shutting down headless-client_1 | [email protected]b1d7fff postgres_1 | LOG: database system is shut down headless-client_1 | [main] INFO org.flywaydb.core.internal.util.VersionPrinter - Flyway 4.1.0 by Boxfuse headless-client_1 | Could not connect to Postgres - retrying postgres_1 | done postgres_1 | server stopped postgres_1 | postgres_1 | PostgreSQL init process complete; ready for start up. postgres_1 | postgres_1 | LOG: database system was shut down at 2017-05-27 11:03:37 UTC postgres_1 | LOG: MultiXact member wraparound protections are now enabled postgres_1 | LOG: autovacuum launcher started postgres_1 | LOG: database system is ready to accept connections headless-client_1 | [main] INFO org.flywaydb.core.internal.dbsupport.DbSupportFactory - Database: jdbc:postgresql://postgres:5432/token (PostgreSQL 9.6) headless-client_1 | [main] INFO org.flywaydb.core.internal.command.DbValidate - Successfully validated 1 migration (execution time 00:00.068s) headless-client_1 | [main] INFO org.flywaydb.core.internal.metadatatable.MetaDataTableImpl - Creating Metadata table: "public"."schema_version" headless-client_1 | [main] INFO org.flywaydb.core.internal.command.DbMigrate - Current version of schema "public": << Empty Schema >> headless-client_1 | [main] INFO org.flywaydb.core.internal.command.DbMigrate - Migrating schema "public" to version 1 - Initial model headless-client_1 | [main] INFO org.flywaydb.core.internal.command.DbMigrate - Successfully applied 1 migration to schema "public" (execution time 00:00.407s). headless-client_1 | [main] INFO org.bitcoinj.crypto.MnemonicCode - PBKDF2 took 202.9 ms headless-client_1 | [main] WARN org.bitcoinj.core.Context - Implicitly creating context. This is a migration step and this message will eventually go away. headless-client_1 | [main] INFO org.bitcoinj.core.Context - Creating bitcoinj 0.14.3 context. headless-client_1 | [main] INFO org.bitcoinj.wallet.DeterministicKeyChain - 133 keys needed for M/0H/0 = 0 issued + 100 lookahead size + 33 lookahead threshold - 0 num children headless-client_1 | [main] INFO org.bitcoinj.wallet.DeterministicKeyChain - Took 167.7 ms headless-client_1 | [main] INFO org.bitcoinj.wallet.DeterministicKeyChain - 133 keys needed for M/0H/1 = 0 issued + 100 lookahead size + 33 lookahead threshold - 0 num children headless-client_1 | [main] INFO org.bitcoinj.wallet.DeterministicKeyChain - Took 90.20 ms headless-client_1 | ID Address: 0xe2ddb672a6df6dc273b6090dae19ac3be706d60a headless-client_1 | Wallet Address: 0x1b04cea979206fb765f77c158d56a429d303f4df headless-client_1 | Trust Store Name: token.store headless-client_1 | onSubcribe 0xe2ddb672a6df6dc273b6090dae19ac3be706d60a headless-client_1 | onSubcribe 0xe2ddb672a6df6dc273b6090dae19ac3be706d60a_rpc_request I'm trying to search for "mdtestapp50222" on my Android Token Client, but nothing shows up.

Posted by Mikhail D 26 days ago