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

Question: Development build with debugging module #11883

Closed
EskelCz opened this issue Jun 28, 2024 · 3 comments
Closed

Question: Development build with debugging module #11883

EskelCz opened this issue Jun 28, 2024 · 3 comments

Comments

@EskelCz
Copy link
Contributor

EskelCz commented Jun 28, 2024

Type of issue

Question

Description

Whenever I'm replacing production prebid with unminified/development build of prebid (using resource override) and using __pbjs_debugging__ in session storage, I get this error:

prebid-error

Any idea what might be happening?

I'm building the full version like this: gulp build-bundle-dev --modules=modules.json, I assume that is correct.

Steps to reproduce

  1. Visit https://www.poznatsvet.cz/?pbjs_debug=true
  2. Use resource override to replace:
    https://cdn.cpex.cz/hb/prebid/prebid.min.js -> https://cdn.cpex.cz/stage/hb/prebid/8.49.0/prebid.js
  3. Add debugging:
pbjs.setConfig({
  debugging: { enabled: true, bids: [{ cpm: 15 }] }
})

Expected results

Debugging mode to work with unminified version

Actual results

Error, Prebid breaks after that point

Platform details

MacOS, latest Chrome, Prebid 8.49.0

@EskelCz EskelCz changed the title Question Question: Development build with debugging module Jun 28, 2024
@EskelCz
Copy link
Contributor Author

EskelCz commented Jun 28, 2024

I know the path isn't there but the same thing works with the minified version, so I assume the paths is supposed to be relative, within a bundle? Not sure how this works.

@dgirardi
Copy link
Collaborator

dgirardi commented Jun 29, 2024

On development builds, by default, it points to the dev server (as you have discovered). It doesn't work too well for what you're trying to do, and maybe we should change it - it made sense to me because I was thinking of development on Prebid itself.

this is where the path is chosen, and here's the override. You can set it explicitly with:

gulp build --dist-url-base "https://cdn.jsdelivr.net/npm/prebid.js@latest/dist/"

another option I think would work in your case would be to just include the debugging module - it won't try to fetch it if it's installed.

@EskelCz
Copy link
Contributor Author

EskelCz commented Jul 1, 2024

Thanks, building in the debugging module for the dev version turned out to be the simplest solution. Closing

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Development

No branches or pull requests

2 participants