The emulator can run normally, but an error is reported in testnet

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!”

:x: 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!

There was a breaking change in the last release of Cadence, see The owner field behaviour was fixed, it is now only set when the resource is in storage.

The emulator has not been updated yet, but will be shortly.

It was just updated, Thank you!