I have a piece of code that can run normally in the emulator, but an error is reported in testnet
pub resource somename{
destroy () {
emit completed(
address: self.owner?.address!
)
}
The code is omitted, and the error is this line βaddress: self.owner?.address!β
Transaction Error
[Error Code: 1101] cadence runtime error Execution failed:
error: unexpectedly found nil while forcing an Optional value
Who can help me see whatβs wrong? thank you!