videokit-ai / videokit

Low-code, cross-platform media SDK for Unity Engine. Register at https://videokit.ai
https://videokit.ai
Apache License 2.0
106 stars 14 forks source link

Access Key Works in editor but not in IOS build #34

Closed Benjamin-Rhodes-Kropf closed 1 year ago

Benjamin-Rhodes-Kropf commented 1 year ago

Everything works great in the editor, including video and photo recording. BUT when I build a mobile IOS device I get the following errors: "InvalidOperationExeption: NatCorder session token invalid. Check your NatML access key and plan" "InvalidOperationExeption: NatDevice session token invalid. Check your NatML access key and plan" "InvalidOperationExeption: NatDevice session token invalid. Check your NatML access key and plan"

I've been trouble shooting this bug for two days now any idea is welcome!

olokobayusuf commented 1 year ago

Hey there @Benjamin-Rhodes-Kropf , we're working on revamping this system. In the mean time, can you share the full logs from Xcode in a .txt attachment? There should be a preceding error that mentions why the session token is invalid.

Aditya-Solulab commented 1 year ago

Hey, Same issue I found "InvalidOperationExeption: NatCorder session token invalid. Check your NatML access key and plan" "InvalidOperationExeption: NatDevice session token invalid. Check your NatML access key and plan" "InvalidOperationExeption: NatDevice session token invalid. Check your NatML access key and plan"

I review the Xcode there is missing ai.natml-natml framework

Aditya-Solulab commented 1 year ago

https://docs.google.com/document/d/1BfK6rbig598Xohham3xjaNsMoOhhrl7et-02k58OTMo/edit

This is the log kindly review

Benjamin-Rhodes-Kropf commented 1 year ago

Hey! Thanks for the reply; I rebuilt my code and changed my Unity version, which seemed to work. However, I am now having problems with accessing the camera and audio (it takes 3-4 seconds every time). Is that normal?

On Thu, Jun 29, 2023 at 3:15 AM Aditya-Solulab @.***> wrote:

https://docs.google.com/document/d/1BfK6rbig598Xohham3xjaNsMoOhhrl7et-02k58OTMo/edit

This is the log kindly review

— Reply to this email directly, view it on GitHub https://github.com/natmlx/videokit/issues/34#issuecomment-1612536874, or unsubscribe https://github.com/notifications/unsubscribe-auth/AUJCD2RFUR3IF67DOVUPCIDXNUTQ7ANCNFSM6AAAAAAYOEDHWY . You are receiving this because you were mentioned.Message ID: @.***>

olokobayusuf commented 1 year ago

Hey @Aditya-Solulab , thanks for sharing your logs. Are you embedding your Unity app in another iOS app? I'll also follow up over email because I'll need potentially sensitive information to proceed on this.

olokobayusuf commented 1 year ago

I rebuilt my code and changed my Unity version, which seemed to work. However, I am now having problems with accessing the camera and audio (it takes 3-4 seconds every time). Is that normal?

@Benjamin-Rhodes-Kropf this doesn't sound normal. I recommend opening a new issue with more info. Also by "it takes 3-4 seconds", do you mean it takes that long to start the camera? And what OS/device does this happen on?

Benjamin-Rhodes-Kropf commented 1 year ago

This is on iOS. Yes I mean it takes this long to start the camera. I will submit a problem.

On Thu, Jun 29, 2023 at 11:49 AM Yusuf Olokoba @.***> wrote:

I rebuilt my code and changed my Unity version, which seemed to work. However, I am now having problems with accessing the camera and audio (it takes 3-4 seconds every time). Is that normal?

@Benjamin-Rhodes-Kropf https://github.com/Benjamin-Rhodes-Kropf this doesn't sound normal. I recommend opening a new issue with more info. Also by "it takes 3-4 seconds", do you mean it takes that long to start the camera? And what OS/device does this happen on?

— Reply to this email directly, view it on GitHub https://github.com/natmlx/videokit/issues/34#issuecomment-1613444452, or unsubscribe https://github.com/notifications/unsubscribe-auth/AUJCD2XZYMZP7NYR2QIQWBTXNWPYFANCNFSM6AAAAAAYOEDHWY . You are receiving this because you were mentioned.Message ID: @.***>

Aditya-Solulab commented 1 year ago

Hi yusuf,

No currently I am not embedding the Unity app into another app. I am using unity 2021.3.4f1 its give me

am using NATML Video kit Everything works great in the editor, including video and photo recording. BUT when I build a mobile IOS device I get the following errors:

"InvalidOperationExeption: NatCorder session token invalid. Check your NatML access key and plan" "InvalidOperationExeption: NatDevice session token invalid. Check your NatML access key and plan" "InvalidOperationExeption: NatDevice session token invalid. Check your NatML access key and plan"

I've been having trouble shooting this bug for two days now any idea is welcome!

I am review the Issue on git there also no answer https://github.com/natmlx/videokit/issues/34

I am attaching the logs kindly review the logs https://docs.google.com/document/d/1BfK6rbig598Xohham3xjaNsMoOhhrl7et-02k58OTMo/edit

Any help is really appreciated.

Thanks in advance

On Thu, Jun 29, 2023 at 9:17 PM Yusuf Olokoba @.***> wrote:

Hey @Aditya-Solulab https://github.com/Aditya-Solulab , thanks for sharing your logs. Are you embedding your Unity app in another iOS app? I'll also follow up over email because I'll need potentially sensitive information to proceed on this.

— Reply to this email directly, view it on GitHub https://github.com/natmlx/videokit/issues/34#issuecomment-1613442483, or unsubscribe https://github.com/notifications/unsubscribe-auth/BAHTVNMF6HBRSKWS5QV675DXNWPSRANCNFSM6AAAAAAYOEDHWY . You are receiving this because you were mentioned.Message ID: @.***>

olokobayusuf commented 1 year ago

Hey @Aditya-Solulab , can you try the 0.0.14-alpha.1 pre-release build? We've reimplemented how access keys are implemented, so this issue should no longer happen.

Aditya-Solulab commented 1 year ago

HI Natmlx/Videokit, I tried new 0.0.14-alpha.1 https://www.npmjs.com/package/ai.natml.videokit version. but I got media assets is null in the editor on StopVideoRecording

Thanks

On Tue, Jul 4, 2023 at 3:33 AM Yusuf Olokoba @.***> wrote:

Hey @Aditya-Solulab https://github.com/Aditya-Solulab , can you try the 0.0.14-alpha.1 https://www.npmjs.com/package/ai.natml.videokit pre-release build? We've reimplemented how access keys are implemented, so this issue should no longer happen.

— Reply to this email directly, view it on GitHub https://github.com/natmlx/videokit/issues/34#issuecomment-1619194422, or unsubscribe https://github.com/notifications/unsubscribe-auth/BAHTVNIK2FJHIWT2VUJUTQDXOM6R5ANCNFSM6AAAAAAYOEDHWY . You are receiving this because you were mentioned.Message ID: @.***>

Aditya-Solulab commented 1 year ago

Hi I tried new version 0.0.14-alpha.1 https://www.npmjs.com/package/ai.natml.videokit version. In editor works the session key(access key) but in IOS Device valid. Check your NatML access key. at VideoKit.Internal.VideoKit.CheckStatus (VideoKit.Internal.VideoKit+Status status) [0x00000] in

<00000000000000000000000000000000>:0 at VideoKit.VideoKitRecorder.PrepareEncoder () [0x00000] in <00000000000000000000000000000000>:0 at System.Runtime.CompilerServices.AsyncTaskMethodBuilder.Start[TStateMachine] (TStateMachine& stateMachine) [0x00000] in <00000000000000000000000000000000>:0 at VideoKit.VideoKitRecorder.PrepareEncoder () [0x00000] in <00000000000000000000000000000000>:0 at VideoKit.VideoKitRecorder.Awake () [0x00000] in <00000000000000000000000000000000>:0 at System.Runtime.CompilerServices.AsyncVoidMethodBuilder.Start[TStateMachine] (TStateMachine& stateMachine) [0x00000] in <00000000000000000000000000000000>:0 at VideoKit.VideoKitRecorder.Awake () [0x00000] in <00000000000000000000000000000000>:0 --- End of stack trace from previous location where exception was thrown --- at VideoKit.VideoKitRecorder.Awake () [0x00000] in <00000000000000000000000000000000>:0 at System.Runtime.CompilerServices.AsyncVoidMethodBuilder.Start[TStateMachine] (TStateMachine& stateMachine) [0x00000] in <00000000000000000000000000000000>:0 at VideoKit.VideoKitRecorder.Awake () [0x00000] in <00000000000000000000000000000000>:0 --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.AsyncMethodBuilderCore+<>c.b__7_0 (System.Object state) [0x00000] in <00000000000000000000000000000000>:0 at UnityEngine.UnitySynchronizationContext+WorkRequest.Invoke () [0x00000] in <00000000000000000000000000000000>:0 at UnityEngine.UnitySynchronizationContext.Exec () [0x00000] in <00000000000000000000000000000000>:0 2023-07-04 17:28:06.399054+0530 xrnode[2486:925131] UnityARKit: Updating ARSession configuration with autoFocus=Enabled environmentTexturing=None wantsHDREnvironmentTextures=Enabled planeDetection=Horizontal collaboration=Disabled userFaceTracking=Disabled sceneReconstruction=None appClipCodeTracking=Disabled> 2023-07-04 17:28:06.410703+0530 xrnode[2486:925131] UnityARKit: Updating ARSession configuration with autoFocus=Enabled environmentTexturing=None wantsHDREnvironmentTextures=Enabled planeDetection=Horizontal collaboration=Disabled userFaceTracking=Disabled sceneReconstruction=None appClipCodeTracking=Disabled> InvalidOperationException: VideoKit session token is invalid. Check your NatML access key. at VideoKit.Internal.VideoKit.CheckStatus (VideoKit.Internal.VideoKit+Status status) [0x00000] in <00000000000000000000000000000000>:0 at VideoKit.Recorders.MP4Recorder.Create (System.Int32 width, System.Int32 height, System.Single frameRate, System.Int32 sampleRate, System.Int32 channelCount, System.Int32 videoBitRate, System.Int32 keyframeInterval, System.Int32 audioBitRate) [0x00000] in <00000000000000000000000000000000>:0 at VideoKit.VideoKitRecorder.CreateRecorder (System.Int32 width, System.Int32 height, System.Int32 sampleRate, System.Int32 channelCount) [0x00000] in <00000000000000000000000000000000>:0 at VideoKit.VideoKitRecorder.StartRecording () [0x00000] in <00000000000000000000000000000000>:0 at System.Runtime.CompilerServices.AsyncVoidMethodBuilder.Start[TStateMachine] (TStateMachine& stateMachine) [0x00000] in <00000000000000000000000000000000>:0 at VideoKit.VideoKitRecorder.StartRecording () [0x00000] in <00000000000000000000000000000000>:0 at XRStudio.Scipts.UI.UIController.OnVideoRecordButtonDown () [0x00000] in <00000000000000000000000000000000>:0 at UnityEngine.Events.UnityEvent.Invoke () [0x00000] in <00000000000000000000000000000000>:0 at XRStudio.Scipts.UI.VideoRecordButton+d__18.MoveNext () [0x00000] in <00000000000000000000000000000000>:0 at UnityEngine.SetupCoroutine.InvokeMoveNext (System.Collections.IEnumerator enumerator, System.IntPtr returnValueAddress) [0x00000] in <00000000000000000000000000000000>:0 --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.AsyncMethodBuilderCore+<>c.b__7_0 (System.Object state) [0x00000] in <00000000000000000000000000000000>:0 at UnityEngine.UnitySynchronizationContext+WorkRequest.Invoke () [0x00000] in <00000000000000000000000000000000>:0 at UnityEngine.UnitySynchronizationContext.Exec () [0x00000] in <00000000000000000000000000000000>:0 throw this error On Tue, Jul 4, 2023 at 5:27 PM Aditya Rajput ***@***.***> wrote: > HI Natmlx/Videokit, > I tried new 0.0.14-alpha.1 > version. > but I got media assets is null in the editor on StopVideoRecording > > Thanks > > On Tue, Jul 4, 2023 at 3:33 AM Yusuf Olokoba ***@***.***> > wrote: > >> Hey @Aditya-Solulab , can you try >> the 0.0.14-alpha.1 >> pre-release build? We've reimplemented how access keys are implemented, so >> this issue should no longer happen. >> >> — >> Reply to this email directly, view it on GitHub >> , >> or unsubscribe >> >> . >> You are receiving this because you were mentioned.Message ID: >> ***@***.***> >> >
olokobayusuf commented 1 year ago

Hey @Aditya-Solulab can you share the full logs from Xcode in a .txt attachment? The logs you shared are truncated.

Aditya-Solulab commented 1 year ago

Hey Natmlx/Videokit, I reset up my Unity Its works now

On Wed, Jul 5, 2023 at 5:41 PM Yusuf Olokoba @.***> wrote:

Hey @Aditya-Solulab https://github.com/Aditya-Solulab can you share the full logs from Xcode in a .txt attachment? The logs you shared are truncated.

— Reply to this email directly, view it on GitHub https://github.com/natmlx/videokit/issues/34#issuecomment-1621633396, or unsubscribe https://github.com/notifications/unsubscribe-auth/BAHTVNN2IYSUSTZDIVAFKJLXOVKXJANCNFSM6AAAAAAYOEDHWY . You are receiving this because you were mentioned.Message ID: @.***>

olokobayusuf commented 1 year ago

@Aditya-Solulab sounds good. I'll keep this issue open until we publish the 0.0.14 update. In the mean time, let me know if you face any issues.

Aditya-Solulab commented 1 year ago

Thanks a lot for understanding.

On Sun, Jul 9, 2023 at 6:58 PM Yusuf Olokoba @.***> wrote:

@Aditya-Solulab https://github.com/Aditya-Solulab sounds good. I'll keep this issue open until we publish the 0.0.14 update. In the mean time, let me know if you face any issues.

— Reply to this email directly, view it on GitHub https://github.com/natmlx/videokit/issues/34#issuecomment-1627716355, or unsubscribe https://github.com/notifications/unsubscribe-auth/BAHTVNP527BVTYTI74ARFTLXPKWX7ANCNFSM6AAAAAAYOEDHWY . You are receiving this because you were mentioned.Message ID: @.***>

Aditya-Solulab commented 1 year ago

HI I reported a new issue. https://github.com/natmlx/videokit/issues/41

Issue related to unity and IOS Integration

Thanks in advance

On Thu, Jul 13, 2023 at 3:57 PM Aditya Rajput @.***> wrote:

Thanks a lot for understanding.

On Sun, Jul 9, 2023 at 6:58 PM Yusuf Olokoba @.***> wrote:

@Aditya-Solulab https://github.com/Aditya-Solulab sounds good. I'll keep this issue open until we publish the 0.0.14 update. In the mean time, let me know if you face any issues.

— Reply to this email directly, view it on GitHub https://github.com/natmlx/videokit/issues/34#issuecomment-1627716355, or unsubscribe https://github.com/notifications/unsubscribe-auth/BAHTVNP527BVTYTI74ARFTLXPKWX7ANCNFSM6AAAAAAYOEDHWY . You are receiving this because you were mentioned.Message ID: @.***>

olokobayusuf commented 1 year ago

Fixed in VideoKit 0.0.14.