Skip to content

Setup for SPA not working #479

Closed

Description

@ivanyv

I ran into some issues\ trying to install the profiler on a Vue app. First, I had to modify the script tag from the example in the README, as it was missing two required data attributes (data-hidden-custom-fields data-html-container="body").

Then I was getting this error in the console: POST http://localhost:3000/mini-profiler-resources/results 404 (Not Found). Which I traced to using "wrong" data-id / data-ids values.

I ended up with this:

<script type="text/javascript" id="mini-profiler"
        src="/mini-profiler-resources/includes.js?v=10da952c710f6abd9f1bd50fe50ed714"
        data-css-url="/mini-profiler-resources/includes.css?v=10da952c710f6abd9f1bd50fe50ed714"
        data-version="10da952c710f6abd9f1bd50fe50ed714" data-path="/mini-profiler-resources/"
        data-horizontal-position="left" data-vertical-position="top"
        data-ids=""
        data-trivial="false" data-children="false" data-max-traces="20" data-controls="false"
        data-total-sql-count="false" data-authorized="true" data-toggle-shortcut="alt+p" data-start-hidden="false"
        data-collapse-results="true" data-html-container="body" data-hidden-custom-fields></script>

I could create a PR for updating the docs if that helps (and above looks right).

Activity

  1. eweitz commented on Oct 26, 2021

    @eweitz

    @ivanyv, many thanks! I encountered the same problems, and your solution worked for me. Such a PR would help.

    (I'm using React and Rails.)

  2. katelovescode commented on Jan 27, 2022

    @katelovescode
    Contributor

    Lifesaver! Was just running into this issue and adding the custom data tags!!! Thank you so much.

  3. added a commit that references this issue on Jan 31, 2022
  4. OmarAboulMakarem commented on Sep 11, 2024

    @OmarAboulMakarem

    i hae the same problem and the problem is indeed in the data-ids, but keeping it without value doesnt work, it only works when i get the id from the rails admin script, but it keeps changing, anyone know how to dynamically get the data-ids

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions