I packaged(managed) sample expense app provided by salesforce in lightning component tutorial. When I tried to access "expenseForm" component from the installation org I got following error
"Failed to save undefined: Unable to read SObject: Source"
Then I tried to get the root cause by packaging line by line and installing on an org. Found that following line of code is causing the error:
<aura:attribute name="newExpense" type="namespace__Expense__c"
default="{ 'sobjectType': 'namespace__Expense__c',
'Name': '',
'namespace__Amount__c': 0,
'namespace__Client__c': '',
'namespace__Date__c': '',
'namespace__Reimbursed__c': false
}"/>
Looks like the issue is with setting the sobject type. Not sure how to resolve this and why the problem is occurring.