cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
slc801
Regular Visitor

Error on Apply To Each - An action failed. No dependent actions succeeded

Hi,

 

I'm getting an error on my flow that takes a CSV Table extracted from a JSON response and inserts into a Azure SQL Database.  The error message is:

ActionFailed. An action failed. No dependent actions succeeded.

 

It is appearing on my Apply to Each action and I cannot figure out how to get any more detailed error information out of my Flow which is making troubleshooting extremely difficult.

 

My relevant actions in my flow looks like this:

FlowDesign20171207.PNG

 

 

I put the SELECT @@VERSION in there simply to verify that I was able to connect to the database correctly.  Both SQL actions are using the same connection.

 

This is what my execution result looks like.  Observe that my "Apply to each" does not show me information about the SQL Insert task.


FlowError20171207.PNG
I have also turned on extended event tracing on the SQL Database and cannot find any failures on the database side.  I see lots of successful executions by the "Mashup Engine" application but no INSERT attempts.

 

Suggestions for ways to peek into the black box for more information about this error?

 

I should probably also add that [Meters] comes from a JSON document with this schema:

 

{
    "type": "object",
    "properties": {
        "OfferTerms": {
            "type": "array"
        },
        "Meters": {
            "type": "array",
            "items": {
                "type": "object",
                "properties": {
                    "EffectiveDate": {
                        "type": "string"
                    },
                    "IncludedQuantity": {
                        "type": "number"
                    },
                    "MeterCategory": {
                        "type": "string"
                    },
                    "MeterId": {
                        "type": "string"
                    },
                    "MeterName": {
                        "type": "string"
                    },
                    "MeterRates": {
                        "type": "object",
                        "properties": {
                            "0": {
                                "type": "number"
                            }
                        }
                    },
                    "MeterRegion": {
                        "type": "string"
                    },
                    "MeterSubCategory": {
                        "type": "string"
                    },
                    "MeterTags": {
                        "type": "array"
                    },
                    "Unit": {
                        "type": "string"
                    }
                },
                "required": [
                    "EffectiveDate",
                    "IncludedQuantity",
                    "MeterCategory",
                    "MeterId",
                    "MeterName",
                    "MeterRates",
                    "MeterRegion",
                    "MeterSubCategory",
                    "MeterTags",
                    "Unit"
                ]
            }
        },
        "Currency": {
            "type": "string"
        },
        "Locale": {
            "type": "string"
        },
        "IsTaxIncluded": {
            "type": "boolean"
        }
    }
}

 

1 ACCEPTED SOLUTION

Accepted Solutions

Hi slc801,

 

There are some current limits in Flow, please check this doc:
https://docs.microsoft.com/en-us/flow/limits-and-config

 

It seems like there is a 5000 items limit for ForEach items for a single flow run.

 

Best regards,
Mabel Mao

Community Support Team _ Mabel Mao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

5 REPLIES 5
v-yamao-msft
Community Support
Community Support

Hi slc801,

 

I am afraid that some parameters you provided for the SQL table fields don’t meet each other.


Please make sure “MeterId” will return a number without confliction with each other, and all the parameters will return values that meet the data type in SQL table.


When testing this issue on my side with other actions, Apply to each doesn’t return an error.
3.PNG

Best regards,
Mabel Mao

Community Support Team _ Mabel Mao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Thanks for digging into that.  It appears that may not solve my problem yet.  Did you by chance create a JSON file and parse it using the schema I provided?  I can provide an example of that if you need.  It's public data from Azure.

 

Based on your tests, I had some more ideas to test.  So I trimmed my table to a single column table with no primary key.  The column has 512 byte VARCHAR datatype so should be able to accept everything I'm giving it.

 

I tried sending several different JSON parsed fields into that one column and was still failing.  Curiously I see this interesting message in the ForEach while preceding steps are running:

 

InterestingMessageDuringFlowExecution.PNG

 

 

I wonder if that could be pointing to something else that is going on.  It's really hard to know because the warning and error messages have been unusally unhelpful for debugging.

 

Beyond the VARCHAR(512) I have tried VARCHAR(8000), NVARCHAR(4000), NVARCHAR(MAX) and VARCHAR(MAX) for the datatype of that single column and always get the generic error.

 

At this point I feel like it is not data type or unique row related.  Do you concur?

slc801
Regular Visitor

I have been able to find the first breaking point in the file and it does seem to be content releated.  I narrowed it down to one JSON record that would correspond to a row in the database. 

 

It is the 5001 record in the file and is at line number 65482.  Both of those may imply there is some type of limit I'm running into.  Is there a 5000 row limit it on any actions or is there any 65535 or 64k limit on number of lines in any action I'm using?

 

Looking over that file I cannot see any datatype differences or length type issues that would warrant a failure.  Happy to share the files if there is some way to do it.

Hi slc801,

 

There are some current limits in Flow, please check this doc:
https://docs.microsoft.com/en-us/flow/limits-and-config

 

It seems like there is a 5000 items limit for ForEach items for a single flow run.

 

Best regards,
Mabel Mao

Community Support Team _ Mabel Mao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Thanks.  This was very helpful.  I attempted to use a filter operations on the parsed JSON and was able to filter it down to ~450 records but then it would not complete any write operation (OneDrive Create File or SQL Server Insert Row).  It goes on with no apparent activity for 2 hours and then times out with the same error message. 


Given that the error message is so easy to get and it is not very specfiic, I'm going to move this off of Flow and find some other way.  It takes way too much troubleshooting time to develop in Flow with the foreach with the current state of the offering. 

 

Maybe I'll try later.  Thanks!

Helpful resources

Announcements
MPA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

V3_PVA CAmpaign Carousel.png

Community Challenge - Giveaways!

Participate in the Power Virtual Agents Community Challenge

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Top Solution Authors
Users online (2,994)