How do i overcome a Failure_InternalError ?

Former Member
Former Member
Hey Monkeys ;)
I am using the the iphone to send data from the iphone to the watch.
But a lot of times i received a bad result "Failure_InternalError"
I am using this method to send message to the watch:
[[ConnectIQ sharedInstance] sendMessage:values toApp:_garminApp progress:^(uint32_t sentBytes, uint32_t totalBytes)

Usually it happens the second time the watch asks for data from the iphone.
This is how i send message from the watch to the iphone:
Comm.transmit( "something", null, listener );
I know the iphone is receiving the messages from the watch.

How can i overcome this problem?

Thank you!
  • I've forwarded your post on to our Mobile SDK guys to see if they can get you an answer.
  • Former Member
    Former Member over 10 years ago
    gariel, I have a couple of questions

    1. Are you only seeing this when transmitting from the iPhone to the watch (i.e. not vice versa)?
    2. Do you see this issue when the transmissions are spaced out, for example 2-3 seconds between iPhone sendMessage() calls?

    Please let me know and thanks!
  • Former Member
    Former Member over 10 years ago
    gariel, I have a couple of questions

    1. Are you only seeing this when transmitting from the iPhone to the watch (i.e. not vice versa)?
    2. Do you see this issue when the transmissions are spaced out, for example 2-3 seconds between iPhone sendMessage() calls?

    Please let me know and thanks!



    Hey Jason
    1.Yes, when transmitting from iphone to watch it fails , but i know that the iphone is receiving what the watch is sending him.
    2.Yes, the issue is when there is a couple of seconds in between the transmissions.

    is there a way to overcome this issue?
  • Former Member
    Former Member over 10 years ago
    I realized the issue only occurred when the watch sends data to the iphone, that's when the iphone fails to send to the watch data.
    This is the flow:
    1. when start/stop button is pressed the watch sends data to the iphone to tell the iphone to start sending data to the watch , using: Comm.transmit()
    2. iphone sends data to watch using sendMessage()
    3. when start/stop button is pressed the watch sends data to iphone to ask to stop sending data to the watch. using: Comm.transmit()

    when i repeat this flow the iphone won't send data again.
  • Former Member
    Former Member over 10 years ago
    Hey gariel,

    thanks for sharing your issue.

    I will take a closer look into this problem this week and hopefully we can find the issue and solve it straight away.

    As you said, your problem seems to occur reproducable when doing those 3 steps you mentioned after each other, right?
    Is there any chance for us, to get a small sample code from you, which causes your problem? It would help us immense to find the root of all evil! :)

    I will try to rebuild your scenario, but if you have something already available, like a small "this is my problem" project, I would love to take a look into it.
    If you don't want to share anything of your code, which would be totally understandable, don't worry, I will try to reproduce the issue by myself.

    Feel free to send any code samples to [email][email protected][/email], we will then investigate it.

    Thanks in advance for sharing and I will let you know right here, how far I got with reproducing and fixing this problem.
  • Former Member
    Former Member over 10 years ago
    Hey gariel,

    thanks for sharing your issue.

    I will take a closer look into this problem this week and hopefully we can find the issue and solve it straight away.

    As you said, your problem seems to occur reproducable when doing those 3 steps you mentioned after each other, right?
    Is there any chance for us, to get a small sample code from you, which causes your problem? It would help us immense to find the root of all evil! :)

    I will try to rebuild your scenario, but if you have something already available, like a small "this is my problem" project, I would love to take a look into it.
    If you don't want to share anything of your code, which would be totally understandable, don't worry, I will try to reproduce the issue by myself.

    Feel free to send any code samples to [email][email protected][/email], we will then investigate it.

    Thanks in advance for sharing and I will let you know right here, how far I got with reproducing and fixing this problem.


    Hey,
    Im sorry but i cant send you my code.
    I can say that using your example apps for garmin device(Comm) and the ios (ExampleApp) i had managed to see the same problem.
    In the garmin app example (Comm project) i add an option to send data to the phone as well.
    It works great i can send data from the phone to the watch and reverse, but when i send from the phone to the watch, and from the watch to the phone both at the same time thats when the failure occurs . The iphone receives the data from the watch but fails to send back to the watch.



    function notifyIphone()
    {
    var listener = new CommListener();
    Comm.transmit( "hello", null, listener );
    Sys.println( action );
    }

    class CommListener extends Comm.ConnectionListener
    {
    function onComplete()
    {
    Sys.println( "Transmit Complete" );
    }

    function onError()
    {
    Sys.println( "Transmit Failed" );
    }
    }

    function onEnter()
    {
    relatedView.notifyIphone();
    return true;
    }
  • Former Member
    Former Member over 10 years ago
    Ok, thank you. I will have a closer look at this and try to reproduce it, will let you know what I found out.

    Thanks for your help.
  • Former Member
    Former Member over 10 years ago
    Great looking foward to hear from you!
  • Former Member
    Former Member over 10 years ago
    Hey gariel,

    I just wanted to let you know, that we are able to reproduce this issue.
    It happens like you said:

    If you send data from iOS to CIQ, and while this transfer is active, send a message from CIQ to iOS, the transfer stops on iOS side with Failure_InternalError and after that, it is not possible to send any more data from iOS to CIQ. From CIQ to iOS still works.
    I took some deeper look into it already, but haven't found the root cause of it.

    We will investigate this issue in depth of course, but right now I can not give you a date when this will be fixed. It might take some time.

    Maybe for the meantime, there is a way for you, to let your apps communicate in a different way to each other. Maybe you send just every 5 seconds data from iOS to CIQ, and between this interval, if iOS is not sending data to your watch, you let the watch send its status, if it wants data or not.
    I know it's not a good solution, but maybe some changes in your architecture could work around this bug for the time being.

    If I have new information about this issue, I will let you know inside this thread.
  • Former Member
    Former Member over 10 years ago
    Thank you , I will check in for new news.:o