-
Notifications
You must be signed in to change notification settings - Fork 33
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[React Native] Can currently only create a blob from other Blobs #40
Comments
This is an interesting issue and it seems to revolve around ReactNative not
supporting data blobs all of a sudden? In the past data blobs worked fine
and unfortunately the library is somewhat reliant on that capability since
its the most efficient way to accomplish the functionality I needed, I will
have to look into this deeper and possibly even change how data is being
passed in the event it's running inside ReactNative. If you know of a
external module to make use of DataBlobs within ReactNative please give
that a try and let me know if that helps at all. If it's necessary now to
use a third party DataBlob plugin then that is unfortunate but at least I
can ensure the documentation reflects that.
…On Tue, Sep 5, 2017 at 1:23 PM, hsncnzkn ***@***.***> wrote:
Hi, I have a RN application and just want to try parallel programming
using hamsters.js. First, I created a demo app to try it with a worker,
namely https://github.com/fabriciovergal/react-native-workers. however I
am getting a strange error,
What version of the library --> 4.2.0
What operating system are you seeing the issue on? --> Windows
Which platform (and or) browser are you seeing the issue on? React Native
on andorid
What is the version of the platform (and or) browser you are seeing the
issue on? --> RN 48.0
The code that I wrote simply (i saw this in how the library manages your
data) :
initHamsters(){
const startOptions = {
maxThreads: 4,
cache: false,
debug: false,
persistence: false,
Worker: Worker
};
hamsters.init(startOptions);
const params = {
array: [1,2,3,4,5,6,7,8,9,10],
animal: 'Hamster',
};
hamsters.run(params, function() {
if(params.animal === 'Hamster') {
rtn.data.push('Hamsters are awesome');
}
}, function(result) {
console.log(result);
});
}
I have to say that there is not so many worker libraries availalbler for
react native, and the one that I found was working, i tried it. However, it
has some requirements like using two ports and having index.worker.js and I
didnt provide them to run this code. the error is like this :
[image: img_1313]
<https://user-images.githubusercontent.com/15143230/30073766-65465e88-926f-11e7-8aae-4aa135db3672.JPG>
and as I understand this is a react native error, which doesnt allow to
use this library and Worker library.
Any ideas?
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#40>, or mute the
thread
<https://github.com/notifications/unsubscribe-auth/ACH-I_28KWVC5VByvC_pXS7Kz2gCc1hgks5sfYN7gaJpZM4PNRHq>
.
|
Cross referencing this bug report facebook/react-native#16034 |
same problem |
We are still waiting for this to land, looks like it wont be official until 0.53 at the earliest. facebook/react-native#11573 Fortunately the new version of Hamsters.js will include a workaround for this, though it's not ideal it should get us past this issue once and for all. |
FYI React Native never supported Blobs. |
I moved my code to Heroku => post the image file and send it to Firestore. |
@satya164 I can definitively say the library worked flawlessly (Android 4.0+) when I first started developing using ReactNative about a year and a half ago. Blob support was never an issue, whether it really worked or just failed silently the library never had an issue running until recent version of RN were released. Perhaps it has something to do with their push for the new fiber stuff. There is a solution to this problem but it requires using the external |
@amos80m You solved the problem within Hamsters.js or the problem within ReactNative? I'm not sure i follow. |
It's not related to Fiber. There was no |
Can you give dev branch a try alongside react-native-threads? Just make sure you import the library as laid out below. Apologies for the long delay, next version is a complete ground up rewrite of the library and its taken a long time to get it where I want.
and then do this on your library startup
Please report back your results, I'm nearing completion on the next library version and react native support is important, thanks! |
I do not have access to any systems that will allow me to test react native support especially for IOS or AppleTV etc. I will need the community to validate this works. |
@austinksmith I created a Node.j.s App that receive images files as post from react native app. |
I've released version 5.0.0 of Hamsters.js, this should resolve any outstanding react native issues but please open a ticket if it does not 👍 thanks! https://github.com/austinksmith/Hamsters.js/releases/tag/v5.0.0 |
Hi, I have a RN application and just want to try parallel programming using hamsters.js. First, I created a demo app to try it with a worker, namely https://github.com/fabriciovergal/react-native-workers. however I am getting a strange error,

What version of the library --> 4.2.0
What operating system are you seeing the issue on? --> Windows
Which platform (and or) browser are you seeing the issue on? React Native on andorid
What is the version of the platform (and or) browser you are seeing the issue on? --> RN 48.0
The code that I wrote simply (i saw this in how the library manages your data) :
initHamsters(){
const startOptions = {
maxThreads: 4,
cache: false,
debug: false,
persistence: false,
Worker: Worker
};
hamsters.init(startOptions);
const params = {
array: [1,2,3,4,5,6,7,8,9,10],
animal: 'Hamster',
};
hamsters.run(params, function() {
if(params.animal === 'Hamster') {
rtn.data.push('Hamsters are awesome');
}
}, function(result) {
console.log(result);
});
}
I have to say that there is not so many worker libraries availalbler for react native, and the one that I found was working, i tried it. However, it has some requirements like using two ports and having index.worker.js and I didnt provide them to run this code. the error is like this :
and as I understand this is a react native error, which doesnt allow to use this library and Worker library.
Any ideas?
The text was updated successfully, but these errors were encountered: