# Some feedback on first usages

**URL:** <https://discourse.flox.dev/t/some-feedback-on-first-usages/535>\
**Category:** Bug Reports\
**Created:** [December 4, 2022, 10:53am UTC](https://discourse.flox.dev/t/some-feedback-on-first-usages/535 "2022-12-04T10:53:54Z")\
**Posts on this page:** 14\
**Page:** 1

<div class="post-metadata">

**Author:** ![tcoopman](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.flox.dev/tcoopman/32/486_2.png) [@tcoopman](https://discourse.flox.dev/u/tcoopman)\
**Post date:** [December 4, 2022, 10:53am UTC](https://discourse.flox.dev/t/some-feedback-on-first-usages/535/1 "2022-12-04T10:53:54Z")

</div>

This is not a bug report, but more regular feedback as I try flox for the first time.  
Background, I’m new to flox and nix.

flox version: Version: 0.0.7-r76  
nix version: nix-shell (Nix) 2.11.1

(_Update: there are some things in here that are actually bugs - 3 and 4_)

1. About basic usage metrics:

```auto
flox collects basic usage metrics in order to improve the user experience,
including a record of the subcommand invoked along with a unique token.
It does not collect any personal information.

Do you consent to the collection of basic usage metrics? (Y/n) 

```

I’ve answered no to this question, because it’s not clear what a record of the subcommand invoked means and how this data is being used. Some examples of what’s not being tracked and what is would help me to chose yes.

1. No fish support

I’m using fish as my default shell, but was greeted with this:

```auto
unsupported shell: "/usr/bin/fish"
Launching bash instead
flox [default] [thomas@honor ~]$ 

```

1. 404 on searching:

following the guide - [https://beta.floxdev.com/docs/getting-started/using-packages/](https://beta.floxdev.com/docs/getting-started/using-packages/)

```auto
flox search ripgrep
error: unable to download 'https://api.github.com/repos/flox/nixpkgs-flox/commits/master': HTTP error 404

       response body:

       {
         "message": "Not Found",
         "documentation_url": "https://docs.github.com/rest/commits/commits#get-a-commit"
       }
(use '--show-trace' to show detailed location information)

```

1. Cannot install

```auto
flox install ripgrep
fatal: cannot change to '/home/thomas/.cache/flox/meta/local': No such file or directory

```

At this point I’m stuck…

---

<div class="post-metadata">

**Author:** ![paulovieira](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.flox.dev/paulovieira/32/443_2.png) [@paulovieira](https://discourse.flox.dev/u/paulovieira)\
**Post date:** [December 4, 2022, 12:36pm UTC](https://discourse.flox.dev/t/some-feedback-on-first-usages/535/2 "2022-12-04T12:36:25Z")

</div>

I confirm these bugs for 0.0.7-r76. I installed flox using the .deb package in ubuntu 22.04 (making sure that nix was not already installed!).

---

<div class="post-metadata">

**Author:** ![limeytexan](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.flox.dev/limeytexan/32/10_2.png) [@limeytexan](https://discourse.flox.dev/u/limeytexan)\
**Post date:** [December 4, 2022, 3:04pm UTC](https://discourse.flox.dev/t/some-feedback-on-first-usages/535/3 "2022-12-04T15:04:36Z")

</div>

@tcoopman / @paulovieira - thank you for the bug report! I’m looking into the issue and will get back to you shortly …

---

<div class="post-metadata">

**Author:** ![etorreborre](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.flox.dev/etorreborre/32/428_2.png) [@etorreborre](https://discourse.flox.dev/u/etorreborre)\
**Post date:** [December 4, 2022, 3:08pm UTC](https://discourse.flox.dev/t/some-feedback-on-first-usages/535/4 "2022-12-04T15:08:57Z")

</div>

Is it possible that the `nixpkgs-flox` repository is still private and should be made public?

---

<div class="post-metadata">

**Author:** ![limeytexan](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.flox.dev/limeytexan/32/10_2.png) [@limeytexan](https://discourse.flox.dev/u/limeytexan)\
**Post date:** [December 4, 2022, 7:24pm UTC](https://discourse.flox.dev/t/some-feedback-on-first-usages/535/5 "2022-12-04T19:24:42Z")

</div>

Thanks so much for your patience … version 0.0.7-r82 is now available for download and should address issues #3 and #4 above. Rest assured we will be circling back to respond to the first two issues as well but I wanted to let you know right away that we’ve rolled out this new version.

UPDATE: found another bug, version 0.0.7-r83 is now the latest version, osx, deb and rpm downloaders are available for download.

(@etorreborre - if you’d prefer to activate the new version without a reinstall you can access it from the `flox/default` environment per usual.)

---

<div class="post-metadata">

**Author:** ![limeytexan](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.flox.dev/limeytexan/32/10_2.png) [@limeytexan](https://discourse.flox.dev/u/limeytexan)\
**Post date:** [December 4, 2022, 8:09pm UTC](https://discourse.flox.dev/t/some-feedback-on-first-usages/535/6 "2022-12-04T20:09:33Z")

</div>

> [@etorreborre](#):
>
> Is it possible that the `nixpkgs-flox` repository is still private and should be made public?

We have two mechanisms for providing secure access to these private repositories during the closed beta - one for curl and one for git - but yes after the closed beta we’ll be marking this repository as public.

---

<div class="post-metadata">

**Author:** ![etorreborre](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.flox.dev/etorreborre/32/428_2.png) [@etorreborre](https://discourse.flox.dev/u/etorreborre)\
**Post date:** [December 4, 2022, 8:27pm UTC](https://discourse.flox.dev/t/some-feedback-on-first-usages/535/7 "2022-12-04T20:27:16Z")

</div>

Thanks Michael, I just tested 0.0.7-r83 and it works fine for me.  
(the other issue I had [here](https://discourse.flox.dev/t/publishing-my-first-haskell-executable/477/9) still remains though).

---

<div class="post-metadata">

**Author:** ![robinbrantley](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.flox.dev/robinbrantley/32/39_2.png) [@robinbrantley](https://discourse.flox.dev/u/robinbrantley)\
**Post date:** [December 4, 2022, 9:35pm UTC](https://discourse.flox.dev/t/some-feedback-on-first-usages/535/8 "2022-12-04T21:35:35Z")

</div>

> [@tcoopman](#):
>
> 1. No fish support
> 
> I’m using fish as my default shell, but was greeted with this:
> 
> ```auto
> unsupported shell: "/usr/bin/fish"
> Launching bash instead
> flox [default] [thomas@honor ~]$ 
> 
> ```

Just to confirm, fish support is on our list of enhancements to get done. Once implemented, it will be in the release notes in an upcoming release. I don’t currently have a timeframe for this unfortunately but I can say it is definitely something we want to get done and I’ve added you to the list of people requesting it 🙂

---

<div class="post-metadata">

**Author:** ![robinbrantley](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.flox.dev/robinbrantley/32/39_2.png) [@robinbrantley](https://discourse.flox.dev/u/robinbrantley)\
**Post date:** [December 4, 2022, 9:56pm UTC](https://discourse.flox.dev/t/some-feedback-on-first-usages/535/9 "2022-12-04T21:56:25Z")

</div>

> [@tcoopman](#):
>
> 1. About basic usage metrics:
> 
> ```auto
> flox collects basic usage metrics in order to improve the user experience,
> including a record of the subcommand invoked along with a unique token.
> It does not collect any personal information.
> 
> Do you consent to the collection of basic usage metrics? (Y/n) 
> 
> ```
> 
> I’ve answered no to this question, because it’s not clear what a record of the subcommand invoked means and how this data is being used. Some examples of what’s not being tracked and what is would help me to chose yes.

Thank you for this very valuable input. I have logged ticket to get this wording improved and to include examples as you suggest.

To answer the question itself, the flox CLI will batch up the count of the various subcommand invocations and only send batches at most once in an hour in a single curl invocation. The metric counts are accumulated in `~/.cache/flox/metrics-events.json` by default if you want to have a look.

The actual event looks like this:

```auto
                {
                        "event": "cli-invocation",
                        "timestamp": $now,
                        "uuid": "\($uuid)",
                        "properties": {
                                "distinct_id": "flox-cli:\($floxClientUUID)",
                                "$device_id": "flox-cli:\($floxClientUUID)",
                                "$lib": "flox-cli",
                                "subcommand": "\($subcommand)",
                                "$set": {
                                        "flox-cli-uuid": "\($floxClientUUID)"
                                }
                        }
                }

```

… and:

- `$uuid` is a per-event uuid
- `$floxClientUUID` is a random uuid assigned on a per-user / per-home-directory basis at first use and never changes
- `$subcommand` is the subcommand for a given invocation, e.g. `flox list` would have `subcommand="list"`

(The mentions of “$lib” and “$set” are literally the names of keys in our metrics tracking system, so don’t get confused by that.)

---

<div class="post-metadata">

**Author:** ![paulovieira](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.flox.dev/paulovieira/32/443_2.png) [@paulovieira](https://discourse.flox.dev/u/paulovieira)\
**Post date:** [December 5, 2022, 12:17am UTC](https://discourse.flox.dev/t/some-feedback-on-first-usages/535/10 "2022-12-05T00:17:08Z")

</div>

I confirm that the bugs in the initial message are also solved when using the .deb installation. Amazing that you are releasing such fixes this quickly!

Meanwhile I’ve tried some of the tutorials at [https://beta.floxdev.com/docs/](https://beta.floxdev.com/docs/) and everything seems to working fine. I can finally try to understand what is this “flox thing”…

However one tutorial might not work in some cases: [https://beta.floxdev.com/docs/getting-started/developer-environments/](https://beta.floxdev.com/docs/getting-started/developer-environments/)

If I clone [GitHub - flox-examples/hello-python: flox nix expressions framework example Python project](https://github.com/flox-examples/hello-python) from master directly, then I get 404 errors:

```nohighlight
pvieira@flox-demo:~/hello-python$ flox develop
error: unable to download 'https://api.github.com/repos/flox/nixpkgs-flox/tarball/16d226b8b569e1843239292e7fe60906982e73c5': HTTP error 404

       response body:

       {
         "message": "Not Found",
         "documentation_url": "https://docs.github.com/rest/reference/repos#download-a-repository-archive"
       }
(use '--show-trace' to show detailed location information)

ERROR: cannot find attribute path - have you run 'flox init'?

warning: not writing modified lock file of flake 'git+file:///home/pvieira/hello-python':
• Updated input 'floxpkgs/nixpkgs/nixpkgs':
    follows 'floxpkgs/nixpkgs/nixpkgs-stable'
  → 'github:flox/nixpkgs/2788904d26dda6cfa1921c5abb7a2466ffe3cb8c' (2022-11-22)
error: unable to download 'https://api.github.com/repos/flox/capacitor/tarball/1133de9277a703ff2009628fa641989283b088c0': HTTP error 404

       response body:

       {
         "message": "Not Found",
         "documentation_url": "https://docs.github.com/rest/reference/repos#download-a-repository-archive"
       }
(use '--show-trace' to show detailed location information)

```

The problem seems to be related to `flake.lock`, which is now outdated.

This problem might also affect the other “hello-\*” tutorials at [flox-examples · GitHub](https://github.com/flox-examples) , I haven’t checked.

---

<div class="post-metadata">

**Author:** ![tcoopman](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.flox.dev/tcoopman/32/486_2.png) [@tcoopman](https://discourse.flox.dev/u/tcoopman)\
**Post date:** [December 5, 2022, 9:19am UTC](https://discourse.flox.dev/t/some-feedback-on-first-usages/535/11 "2022-12-05T09:19:36Z")

</div>

Thanks for fixing these so quickly. I’m not expecting bugs to get fixed in the weekend 🙂

One small thing I notice:

```auto
flox install ripgrep
warning: You appear to have cloned an empty repository.
...
flox remove ripgrep
warning: remote HEAD refers to nonexistent ref, unable to checkout
removing 'flake:nixpkgs-flox#evalCatalog.x86_64-linux.stable.ripgrep'

```

It seems to work, but I’m not sure where the warnings about the repo come from?

---

<div class="post-metadata">

**Author:** ![limeytexan](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.flox.dev/limeytexan/32/10_2.png) [@limeytexan](https://discourse.flox.dev/u/limeytexan)\
**Post date:** [December 5, 2022, 5:38pm UTC](https://discourse.flox.dev/t/some-feedback-on-first-usages/535/12 "2022-12-05T17:38:38Z")

</div>

> [@tcoopman](#):
>
> It seems to work, but I’m not sure where the warnings about the repo come from?

Yes … that was more or less a consequence of fixing bugs on a weekend. 😉

Version 0.0.7-r84 is out and fixes the bug, but will require that you reinitialize your local state. With that, please do the following:

1. If you have locally-modified environments then invoke the following for each environment you would like to keep: `flox push [-e <environment>]`
2. invoke: `rm -rf ~/.cache/flox ~/.local/share/flox ~/.config/flox/ ~/.cache/nix`
3. invoke: `sudo apt-get update && sudo apt-get upgrade`
4. if there are any environments you’d like to restore then invoke the following for each of them in turn: `flox pull [-e <environment>]`

Please let us know how that works out for you. Many thanks!

---

<div class="post-metadata">

**Author:** ![limeytexan](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.flox.dev/limeytexan/32/10_2.png) [@limeytexan](https://discourse.flox.dev/u/limeytexan)\
**Post date:** [December 5, 2022, 5:41pm UTC](https://discourse.flox.dev/t/some-feedback-on-first-usages/535/13 "2022-12-05T17:41:23Z")

</div>

Hi @paulovieira - I just wanted to let you know we’re still discussing potential fixes for the issue you cited with the `hello-python` example and we’re planning to get a fix out later today. Thanks for being patient with us!

---

<div class="post-metadata">

**Author:** ![robinbrantley](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.flox.dev/robinbrantley/32/39_2.png) [@robinbrantley](https://discourse.flox.dev/u/robinbrantley)\
**Post date:** [January 28, 2023, 12:51pm UTC](https://discourse.flox.dev/t/some-feedback-on-first-usages/535/14 "2023-01-28T12:51:47Z")

</div>

just a quick update regarding point 1) at the top of this thread about collecting basic usage metrics. We have now added an example as suggested to help clarify what data could be collected.  
Thanks for the suggestion! 🙂
