[SalesForce] Formula result is data type (Object), incompatible with expected data type (Text)

I have a simple process builder on opportunity product (on create&edit) to pull value of related Products Family on to a text field (Product_Family_For_Backend_Use) on opportunity product. The process builder was working fine but sometimes its showing error :

Error element myDecision (FlowDecision).
Formula result is data type (Object), incompatible with expected data type (Text).
Flow Details
Flow Name: Update_Product_Family_For_Backend_Use_on_opportunity_product
Type: Record Change Process
Version: 1
Status: Active
Org: Kaptivo Inc (00D1I000002L326)
Flow Interview Details
Interview Label: Update_Product_Family_For_Backend_Use_on_opportunity_product-1_InterviewLabel
Current User: Celeste Henkelmann (0051I000000nyMB)
Start time: 8/28/2018 7:57 AM
Duration: 0 seconds
How the Interview Started
Celeste Henkelmann (0051I000000nyMB) started the flow interview.
Some of this flow's variables were set when the interview started.
myVariable_old = null
myVariable_current = 00k1I00000VdcjbQAB
ASSIGNMENT: myVariable_waitStartTimeAssignment
{!myVariable_waitStartTimeVariable} Equals {!$Flow.CurrentDateTime}
Result
{!myVariable_waitStartTimeVariable} = "8/28/2018 7:57 AM"
Salesforce Error ID: 1730798143-47888 (56480063)

Decision Element:-

enter image description here

Update Action:-

enter image description here

Any suggestions how this could be happening some times and not others? Also what could be the problem.

other than one custom text field…. all other fields & object used in this process are standard..

Thanks for your time!

Best Answer

I'm not sure why the problem is occurring, but following approach might solve your issue permanently.

First, no need to put a condition like Opportunity.Product2.Id is not null, because, Opportunity line item doesn't exist without a product. So, it should be No criteria—just execute the actions!

Secondly, for update action, use formula of return type Text and refer the product family.

update action