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

Missing token in WebGL builds #37

Closed
ragecryx opened this issue Sep 6, 2018 · 3 comments
Closed

Missing token in WebGL builds #37

ragecryx opened this issue Sep 6, 2018 · 3 comments
Assignees
Labels
Milestone

Comments

@ragecryx
Copy link

ragecryx commented Sep 6, 2018

Describe the issue

I build for WebGL and the token is missing (either stripped by the building process or not included at all). I see that there is a VimeoSettings class that is used in VimeoBuildProcessor to set the token on build but nowhere in the README file says I should include a VimeoSettings component in the scene. Is the documentation missing something? Should the VimeoPlayer contain the settings?

Steps to reproduce the problem

  1. Added package in the project
  2. Added a VimeoPlayer (Canvas) object in my scene
  3. Removed the Canvas and made it a child on my already existing Canvas and configured the video surface size to fit my scene.
  4. Used the VimeoPlayer component to successfully login
  5. Added a link for a private video (owned by me/in my account)
  6. Built for WebGL
  7. Deployed to test hosting
  8. This error is displayed after scene loading is complete:
{
    "error": "Something strange occurred. Please contact the app owners.",
    "link": null,
    "developer_message": "No user credentials were provided.",
    "error_code": 8003
}

I inspect the requests sent by the browser and I see an API request to Vimeo with the following header:

Authorization: Bearer

which means the token is missing.

Unity version

2018.2.0f2

Operating system

Ubuntu 16.04 (KDE neon User Edition 5.13)

@ragecryx
Copy link
Author

ragecryx commented Sep 7, 2018

I checked out your repo, built one of your scenes for WebGL and it seems to bundle the token properly. I also tried building my project in OSX 10.12.6 with Unity 2018.2.1f1 but the issue persists.

I also checked the actual playerprefs file and the token is stored properly inside.
Any more ideas?

@ragecryx
Copy link
Author

ragecryx commented Sep 7, 2018

Ok, another update. The VimeoBuildProcessor's OnProcessScene assumes that the player will be direct child of the scene root. My setup positions VimeoPlayer in a (not so complex but quite deep) hierarchy of Canvas/UI elements thus not being able to be found by the build processor.

I'm going to fix that for my project, so do you accept pull requests regarding this or it's something you want to keep as is?

@caseypugh
Copy link
Contributor

caseypugh commented Sep 14, 2018

Hey @ragecryx - sorry for the trouble and thanks for uncovering the issue. We definitely accept PRs! Although, I went ahead and created one which should resolve the issue (see #39)

@caseypugh caseypugh self-assigned this Sep 14, 2018
@caseypugh caseypugh added this to the 0.9.3 milestone Oct 17, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants