AMSMB2 icon indicating copy to clipboard operation
AMSMB2 copied to clipboard

init SMB2Manager throws error

Open haoyuanwu opened this issue 1 year ago • 7 comments

image

haoyuanwu avatar Jan 02 '24 15:01 haoyuanwu

I want to know how to use it

haoyuanwu avatar Jan 02 '24 15:01 haoyuanwu

It appears when the real machine is running

haoyuanwu avatar Jan 03 '24 03:01 haoyuanwu

You are trying to force unwrap a nullable initializer and I think this causes a crash.

The only apparent reason to return nil is when the URL is malformed, though the serverURL is ok and this code should work.

amosavian avatar Jan 04 '24 06:01 amosavian

I actually ran it in the swiftUI environment, and only real tests crashed, not in the emulator. I switched several ways to call the initialization method and still got an error.

haoyuanwu avatar Jan 04 '24 08:01 haoyuanwu

An error is reported even if the run is not forced to expand.

You are trying to force unwrap a nullable initializer and I think this causes a crash.

The only apparent reason to return nil is when the URL is malformed, though the serverURL is ok and this code should work.

An error is reported even if the run is not forced to expand.

haoyuanwu avatar Jan 04 '24 09:01 haoyuanwu

You are trying to force unwrap a nullable initializer and I think this causes a crash.

The only apparent reason to return nil is when the URL is malformed, though the serverURL is ok and this code should work.

image

haoyuanwu avatar Jan 04 '24 09:01 haoyuanwu

Can you check which line of SMB2Manager initializer causes the crash?

amosavian avatar Jan 04 '24 19:01 amosavian