Comments (7)
Hello @westice007 . I am able to reproduce your error with files/cp . For me, I see this error. But if I use files/ls, then it shows that the file was added by files/cp . What does files/ls show on your system?
from gomobile-ipfs.
@jefft0 Instead of using files/ls, I use files/stat to check file, files/ls should be used to check folders
from gomobile-ipfs.
@westice007 , thanks for the clarification. I mean to ask, even if files/cp shows an error, is the file created on your phone?
from gomobile-ipfs.
When I use files/cp, I get an error, but the file copy is successful, and then I can check the result with files/stat
this is my code:
func exeCpCmd(srcPath: String, mfsPath: String) -> String? {
do {
let res = try self.ipfs?.newRequest("files/cp")
.with(argument: srcPath).with(argument: mfsPath)
.send()
} catch let error {
print("this is bug: exeCpCmd cp: \(error) hashId:\(srcPath) mfsPath:\(mfsPath)")
}
var changedHash: String?
do {
var fileInfo : [String: Any]? = [String: Any]()
fileInfo = try self.ipfs!.newRequest("files/stat")
.with(argument: mfsPath)
.sendToDict()
changedHash = fileInfo?["Hash"] as? String
} catch let error {
//print("exeCpCmd cp: \(error) hashId:\(srcPath) mfsPath:\(mfsPath)")
}
return changedHash
}
from gomobile-ipfs.
Thank you for confirming. This is the same behavior for me. We have found the cause of the error. Because files/cp returns an empty response, the return value should be nil. This works in Java (Android), but there is a behavior in the Swift/Go binding code which prevents returning a nil result. We are working on resolving it.
from gomobile-ipfs.
Hello @westice007 . We merged pull request #135 into master which fixes this crash in the Swift code. Can you please check if it fixes your problem? Thanks.
from gomobile-ipfs.
As mentioned. We merged a fix. Closing this issue as resolved. If you still see the error, then please open another issue. Thank you.
from gomobile-ipfs.
Related Issues (20)
- [Android] org.gradle.api.ProjectConfigurationException: A problem occurred configuring project ':bridge'.
- Error configuring bootstrap -- ERROR: input isn't valid multihash HOT 2
- "swarm.key"--How to set up a private network on mobile HOT 2
- Build fails with "You must specify a URL for a Maven repository" HOT 4
- make build_core.ios report an error HOT 3
- Download multiple large files at the same time, error reported:A/go/Seq: NewByteArray failed HOT 9
- [FEATURE]: Support go 1.18 HOT 1
- Support iossimulator in Makefile HOT 1
- Could not find ipfs.gomobile:core:0.0.42-dev. HOT 22
- Build error for Xcode 13.4.1 HOT 4
- How to excute pubsub/sub use gomobile-ipfs HOT 2
- Command to show the DNS server address, and option to set it HOT 1
- Error "Repo opening failed" on Android API 30+
- [Android] How to use "add file" HOT 12
- Java RequestBuilder.withBody(InputStream) EOF error
- how to build on Windows 11? Or can you provide built package? HOT 3
- Update to kubo latest version HOT 1
- Publish to F-Droid HOT 2
- Why android bridge module require location permission, I could not find android LocationManager usage in anywhere of project code.
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gomobile-ipfs.