Application not found


#1

What did you do?

I directed my browser to the URL .com/?registerToken=xxxxxxxxxxxxxxxxxxxxxxxxxxxx8

What happened?

I was redirected to onboarding.<domain>.com/?registerToken=xxxxxxxxxxxxxxxxxxxxxxxxxxxx8 in HTTPS mode.
As I had not configured HTTPS mode, I redirected the URL manually to HTTP://onboarding.<domain>.com/?registerToken=xxxxxxxxxxxxxxxxxxxxxxxxxxxx8

Then I received a strange error message that said
Application not found

Context

Your navigator and operating system


#2

You will have trouble in that case because cookies are secured by default on Cozy and can’t be used on HTTP URL.
You have to create an instance in dev mode (cozy-stack instance add --dev <fqdn>) to be able to use HTTP URL (which we don’t recommend at all).

You have to install onboarding application, when you create your instance (we recommend to install at least onboarding, settings, drive, photos and collect to have a fully working Cozy) with cozy-stack instance add --apps onboarding,settings,drive,photos,collect <fqdn>), or after the creation with cozy-stack app --domain <fqdn> onboarding.


#3

Hi, thanks for the quick reply.

I am still testing, so the --dev flag is kind of ok.

I tried what you said

sudo cozy-stack instances add           \
 --host 0.0.0.0           \
 --apps onboarding,drive,photos,collect,settings          \
  --passphrase "xxxxxxxxx" \
-c /etc/cozy/cozy.yaml \
--dev   <domain>.com

Then visited

`http://onboarding.thegrumpysage.sandcats.io/?registerToken=xxxxxxxxxxxxxxxxxxxxxxxx``

Same result.
Sharing the instance details here

{ "id": "109edc972b15322778fabbf7960029b4", "rev": "", "attributes": { "domain": "xxxxxxxxxxxxxxxxxx", "locale": "en", "dev": true, "onboarding_finished": false, "indexes_version": 11, "passphrase_reset_token": null, "passphrase_reset_time": "0001-01-01T00:00:00Z", "register_token": "xxxxxxxxxxxxxxxxxxxzmbA==" } }

PS : has destroyed and recreated


#5

You can’t use the token of cozy-stack show directly.
You have to reencode the base64 format to the hex format used in the registration URL
echo -n "<base64 token>" | base64 -d | xxd -p


#6

Did that. Had seen another thread.

my token looks like xxxxxa4ad8acfb9772c496a9a78ce66c


#7

So I don’t know. If you have onboarding application installed and a valid token, I have no clue of what’s wrong…


#8

yea. :frowning: retried a few times.
Destroyed the instance each time. Sleepy now, will retry tomorrow.
Let me know if there is some data I can share with you if it would help. :slight_smile:thank you


#9

Hello @theauditor,

To list the applications installed on your server, you can use cozy-stack apps ls --domain <yourdomain>.

I’m pinging @nono who may have an idea.


#10

Hi

The ls command ended with no out put. Just noticed a strange error occurring when I run add instance.

ubuntu@ip-17:~/goenv/bin$ cozy-stack instances add -c /etc/cozy/cozy.yaml --apps onboarding,settings,drive,photos,collect <domain> Failed to create instance for domain <domain> Error: Unqualified error: mkdir /usr/local/bin/storage: permission denied

ubuntu@ip-17-\:~/goenv/bin$ sudo cozy-stack instances add -c /etc/cozy/cozy.yaml --apps onboarding,settings,drive,photos,collect <domain> Failed to create instance for domain <domain> Error: Conflict: Instance already exists


#11

Hello @theauditor,

Looks like running cozy-stack instances add without sudo let your server in some instable state. Are you able to delete the <domain> instance, and create it again?