web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Interrupting code exec...
Power Apps
Unanswered

Interrupting code execution without errors

(0) ShareShare
ReportReport
Posted on by 9

Hello.

I'm having a frequent problem with some of my applications.

When some users try to perform some actions, the codes are interrupted before completing execution. However, these codes do not contain any errors and normally work most of the time.

I imagine that closing the browser or an internet outage could result in the flow breaking, but is there anything else that could cause this break?

Categories:
I have the same question (0)
  • iAm_ManCat Profile Picture
    18,256 Most Valuable Professional on at

    What do the flow runs say?

  • DanielFraga Profile Picture
    9 on at

    This occurs in different flows at different times.

    I have been monitoring the database and noticed that every 1000 runs one does not complete.

     

    Below is a simplified example of a code that gave this error.

    I created this "KeyPatch" item to validate which patch was executed or not. 

    The first patch was executed, after that nothing else was executed. It seems that the flow is simply interrupted in the middle of execution.

    erro.png

  • iAm_ManCat Profile Picture
    18,256 Most Valuable Professional on at

    Hi @DanielFraga 

     

    I see there is some misunderstanding - when you said 'flow' this usually means Power Automate Flow, which is why I asked about the flow runs.

     

    In terms of your code execution, let's look at what its doing and confirm that the data was available:

     

    For the 1 in 1000 execution that failed, can you confirm that there was a row in CadRU that matches that ID and had a status of "Pendente"? Can you also confirm that the second part, the creation of the new file in FilaContagemRecomendacao was also not processed for that same execution?

     

    I can confirm that if the App is closed or the internet connectivity goes out during the middle of the execution of the code, then yes it will not proceed past the point it was disconnected at, as Power Apps calls to datasources and functions are started on the client device and sent through the internet only if there is connectivity available.

     

    Cheers,

    Sancho

  • DanielFraga Profile Picture
    9 on at

    Thank you for your help.
    Sorry for the confusion. I'm not a native English speaker.

     

    Yes, I'm not referring to automate, but rather a code in powerApp.

    What I meant by "1 in 1000 execution that failed" was an estimate of how many times this failure happens, for example if this code is executed 5000 times by my clients, I will have this problem around 5 times or more.

    For CadRU I can confirm that the line exists and had a status of "Pendente", since several other validations carried out before this depend on this information.

    Whenever I notice the error, I rerun the code to redo the validations and it runs normally.

     

    As for FilaContagemRecomendacao, I can guarantee that it was not executed. Hence the concern.

     

    I really believe it is an internet failure, as these errors are always with users of a specific company. But I'm investigating whether there is anything else that could cause this failure just to be safe.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Launch!

Jump in, show your community spirit, and win prizes!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Valantis Profile Picture

Valantis 387

#2
timl Profile Picture

timl 340 Super User 2026 Season 1

#3
Vish WR Profile Picture

Vish WR 301

Last 30 days Overall leaderboard