The forum on this site is closed for new comments and posts. Continue the conversation in the new forum, and learn more here.

Logger displays errors even though code works.

  • Hi Gage,

    That error is generated when the referenced Audio Component (in this case, script.audio) is undefined. Can you verify in the Inspector that the "Audio" property on your Script Component has been assigned to an Audio Component in your scene?

    See the screenshot below for reference:

    Let me know if you're still having trouble after connecting the Audio property, and I'll be happy to continue troubleshooting!

    Best,

    Peter

    Comment actions Permalink
  • Thanks for your reply Peter,

    The audio component is/was assigned, however as you can hopefully see from the gif above when I refresh the preview I still get the error message. If no audio component is assigned or I remove the line

    //@input Component.AudioComponent audio

    the lens preview freezes as it should.

    As of now, the audio has been assigned and the lens plays as it should, yet I still get an error message that prevents me from uploading it.

    thanks,

    Comment actions Permalink
  • Hi Gage,

    Sorry to hear your'e still running into difficulty. I have a few troubleshooting questions that will help me narrow down the cause of the error:

    1) Does the Audio Component have its 'Audio Track' property set to an Audio Resource?

    2) Is there possibly more than one instance of the script 'Script_2' in your scene? I ask because it looks like you're getting the error 3 times, but your script is set to trigger on Initialized, which should only happen once.

    3) Have you tried creating a minimal, isolated audio playback test? For example, comment out line 17 in Script_2. Then create a new Script that is responsible only for playing of the audio. In other words, just:

    //@input Component.AudioComponent audio

    script.audio.play(1);

    Add that script to an entirely new Scene Object and see if you still get an error.

    Let me know what you find after looking into those items, and we'll continue to troubleshoot.

     

    Best,

    Peter

    Comment actions Permalink
  • Hi again Peter,

    Thanks for your troubleshooting suggestions. Once you pointed out that there should only be one error message instead of three, I went back and searched through all of my scene objects and found that I had accidentally added an instance of script 2 to an object I wasn't using and found that the audio source was undefined (like you suggested earlier). After deleting the object the lens ran flawlessly and I was able to upload it. Thanks again for walking me through this, it really helped and I'll be sure to apply this when creating lenses in the future.

    Best wishes,

    gage.

    Comment actions Permalink
  • I am aorking on a new lens you can seehere and facing some display issues if you have any solution please share here.

    Comment actions Permalink

We're here to help! We just need a little bit of information...

What system are you using?

Have you downloaded the latest version of Lens Studio?

Please download the latest version of Lens Studio. If you still run into this issue, please come back and report it!

Is this issue causing Lens Studio to crash?

What system do you run Lens Studio on?

Version

Graphics

Follow the next steps to help us solve your issue:

  • Copy and paste this text into your TerminalCommand Window
    open ~/Library/Preferences/Snap/Lens\ Studio/ %LOCALAPPDATA%\Snap\Lens Studio Copy Text
  • Press ReturnEnter to run the command. The Lens Studio folder will automatically open
  • Prepare to upload your files: zip the "Log" Folder by right-clicking and choosing "compress."
    Locate the Log.txt file right above it.

    Attach a screenshot of the issue:

Name:

Email:

What is this most relevant to?

Please enter a brief description of your issue:

Thanks for submitting this issue.

Unfortunately, it's likely due to the operating system or hardware you're using – since they don't meet the system requirements for Lens Studio.

Still, we hear you loud and clear, and are logging the issue in case there's ever a workaround we can provide!

Minimum Requirements

Operating System: Windows 10 (64 bit); MacOS 10.11+

Hardware: Minimum of Intel Core i3 2.5Ghz or AMD Phenom II 2.6Ghz with 4 GB RAM; Intel HD Graphics 4000 / Nvidia GeForce 710 / AMD Radeon HD 6450 or better; screen resolution of 1280x768 or higher

We'll try to resolve this issue as soon as possible. Thanks for letting us know about it!

Keep an eye out for a followup email from us. We may have a couple more questions for you, or we might already have a solution to offer.

Happy creating!