text:
Feature request: try_collect_into_vec

Using the Result impl for FromParallelIterator, one can already collect the result of many fallible operations into a Result<Vec<_>, _>. However, AFAICT, it is currently impossible to do this multiple times while reusing the same results buffer, which is possible for infallible operations using collect_into_vec. It would be nice if this was supported. I'd expect the semantics around errors to be the same as those for try_for_each, with the backing Vec additionally being cleared if an Err is encountered.
Is this just something that hasn't been implemented yet, or have I missed something that makes this impossible to implement? Would a PR for this be accepted if it can be done? (I haven't previously contributed to rayon and don't know whether I'd be able to do it, but I might try at least)

My initial thought was that we could add ParallelExtend for Result, but this wouldn't let you keep your backing storage in case of an Err.

with the backing Vec additionally being cleared if an Err is encountered.

It would be easy to set_len(0) on Err -- or really with the way src/iter/collect/ works now we would just leave it at 0 to begin with, never setting the final length. But it's harder to properly drop the partial writes because they're not sequential, and at least right now we don't keep any map of what was already written. We kind of have to keep it clear because of that, and those partial items will just be leaked. The immediate Vec memory will be reclaimed, but I mean we won't run Drop for those items, so they will leak any indirect memory, file handles, etc.
We already leak like this if you panic during a collect_into_vec -- see the everyone poops post for some history on that kind of design. But panics are meant to be infrequent, exceptional, whereas leaking for normal Result error handling seems like more of a problem.

Is this just something that hasn't been implemented yet, or have I missed something that makes this impossible to implement? Would a PR for this be accepted if it can be done? (I haven't previously contributed to rayon and don't know whether I'd be able to do it, but I might try at least)

I wouldn't say it's impossible, but I think it's non-trivial given my concerns above. I'm happy to try to mentor you on this though, talking through possible designs, and then implementation if we figure out something satisfactory.

My initial thought was that we could add ParallelExtend for Result, but this wouldn't let you keep your backing storage in case of an Err.

For my current use case, I'm only interested in keeping the backing storage as long as the repeated calls all return Ok(vec![...]). However, std::iter::Extend isn't implemented for Result, so this would be a deviation from std. I'm also having trouble wrapping my head around what such an impl would do (though I haven't tried for very long yet).

But it's harder to properly drop the partial writes because they're not sequential, and at least right now we don't keep any map of what was already written.

Would it be problematic to keep a bitset of what was already written for such a method?

Would it be problematic to keep a bitset of what was already written for such a method?

It's possible. That becomes something you have to allocate during the operation, versus the reused allocation for the data itself, but that's at worst a 1:8 ratio for byte-size data. Except zero-size types, but if someone is collecting a ZST, they're already being silly.
You also would have to be able to split your &mut bitset to be safe for parallel writes, which forces a lower-bound of 8-item splits on the vector for a byte-wise bitset.

authors: cuviper jplatte

repo: rayon-rs/rayon


text:
Abnormal “memory allocation of  bytes failed”

When I use this library or the official tutorial for thread pool, I get an error with the error alert "memory allocation of _ bytes failed Aborted". I'm confused? Why is that? I test it on a 1-core 1GB RAM or 2-core 4G machine with the thread pool size set to 500 or higher, and it also has Such situation. The code is below and I need help to see how I should optimize it. The test file contains 1.7 million lines of string.
170w.txt
0
112
11111
1asdq
.......

use std::fs::File;
use std::io::*;
use std::{thread, time};
use rayon;
use rand::Rng;

fn main() {
    println!("Hello, world!");
        let pool = rayon::ThreadPoolBuilder::new().num_threads(22).build().unwrap();
        let s_dict = init_target("170w.txt");

    for _ in vec![1,2,3,4,5] {
        for sa in s_dict.clone() {
            pool.spawn (move ||{
                //  do some.........
                let mut rng = rand::thread_rng();
                let y = rng.gen_range(0, 10);

                thread::sleep(time::Duration::from_millis(y));
                println!("read {:?} sleep {}", sa, y);

            })
        }
    }

}

pub fn init_target(filename: &str) -> Vec<String> {
    let mut target = Vec::new();

    let f = File::open(filename).unwrap();

    let reader = BufReader::new(f);

    for item in reader.lines() {
        match item {
            Ok(item) => {
                target.push(item);
            }
            Err(_) => {
            }
        }
    }

    target
}

Why are you creating so many threads? With a thread pool, the goal is usually to match the number of logical CPUs in your system. Otherwise, your system will be oversubscribed with competing threads, and a fair OS scheduler will have to frequently switch the active thread on each CPU, which is bad for performance.
The default stack size for Rust threads is 2MiB. If you create a thread pool with 500 threads, that's 1000MB of memory just for the thread stacks, on top of any memory for your actual data.

Why are you creating so many threads? With a thread pool, the goal is usually to match the number of logical CPUs in your system. Otherwise, your system will be oversubscribed with competing threads, and a fair OS scheduler will have to frequently switch the active thread on each CPU, which is bad for performance.
The default stack size for Rust threads is 2MiB. If you create a thread pool with 500 threads, that's 1000MB of memory just for the thread stacks, on top of any memory for your actual data.

I wanted to get the file processing done as quickly as possible, so I set up the thread pool to be large, and on some machines the queries are very, very fast indeed! Get the job done, but some machines don't work. Do you have any good suggestions? Thank you.

If your tasks are primarily CPU-bound, rayon may be well suited, but there wouldn't be any benefit to using more threads than CPUs. If your tasks are frequently waiting on I/O, then using a lot of threads can somewhat hide that, but you might be better off exploring an asynchronous runtime like tokio or async-std.

If your tasks are primarily CPU-bound, rayon may be well suited, but there wouldn't be any benefit to using more threads than CPUs. If your tasks are frequently waiting on I/O, then using a lot of threads can somewhat hide that, but you might be better off exploring an asynchronous runtime like tokio or async-std.

Ok, thank you

source: gharchive/issue

authors: cuviper linweijun

license_type: permissive

license_source: github-api


text:
[rcore] memory leak in UnloadShader()

[ OK ] I tested it on latest raylib version from master branch
[ OK] I checked there is no similar issue already reported
[ OK] I checked the documentation on the wiki
[ OK ] My code has no errors or misuse of raylib

Issue description
Raylib has memory leak in Shader unloading. When it could not load shader library put default shaders descriptors to creating structure. But when I unload this shader locs array is not freed.
https://github.com/raysan5/raylib/blob/7ecc47d12e5f4c322af3d16615a08ba9bc47c4c2/src/rcore.c#L1411-L1420
==72430==ERROR: LeakSanitizer: detected memory leaks

Direct leak of 128 byte(s) in 1 object(s) allocated from:
    #0 0x7e22aaefd1aa in calloc /usr/src/debug/gcc/gcc/libsanitizer/asan/asan_malloc_linux.cpp:77
    #1 0x5c509a18ccf2 in LoadShaderFromMemory /home/nagolove/projects/raylib_last/src/rcore.c:1344
    #2 0x5c509a18cc6f in LoadShader /home/nagolove/projects/raylib_last/src/rcore.c:1314
    #3 0x5c509a15d999 in main (/home/nagolove/raylib_unload_shader/a.out+0x8999) (BuildId: 12b518d97cdb46792438c286ae74a0b90d53dead)
    #4 0x7e22aa434e07  (/usr/lib/libc.so.6+0x25e07) (BuildId: 98b3d8e0b8c534c769cb871c438b4f8f3a8e4bf3)
    #5 0x7e22aa434ecb in __libc_start_main (/usr/lib/libc.so.6+0x25ecb) (BuildId: 98b3d8e0b8c534c769cb871c438b4f8f3a8e4bf3)
    #6 0x5c509a15d824 in _start (/home/nagolove/raylib_unload_shader/a.out+0x8824) (BuildId: 12b518d97cdb46792438c286ae74a0b90d53dead)

SUMMARY: AddressSanitizer: 128 byte(s) leaked in 1 allocation(s).

Environment
OS: Arch Linux x86_64
Raylib version: b07967993f6b13d5edb02c596cde652a3db139a1
Code Example
#include "raylib.h"
#include <stdlib.h>

int main(void) {
    InitWindow(800, 600, "raylib [shaders] example");
    Shader shader = LoadShader(0, "unavaible_path/unknown.fs");

    while (!WindowShouldClose()) {
        BeginDrawing();
        ClearBackground(WHITE);
        EndDrawing();
    }

    UnloadShader(shader);               // Unload shader

// workaround
#if 0
    if (shader.locs) {
        free(shader.locs);
        shader.locs = NULL;
    }
#endif

    CloseWindow();                      // Close window and OpenGL context
    return 0;
}

Build command
gcc main.c -lm -lraylib -fsanitize=undefined,address

@nagolove Good catch! Thanks for reporting! Just added a quick fix to make sure the default shader locations are returned in case of default shader fallback... but default shader fallback was supposed to be removed in latest raylib 5.5 release! Other fallback mechanisms have already been removed in the last few years (models, fonts, textures).
I'm keeping this issue open while I review the full shader system because avoiding fallback could generate some crash.

license: Zlib


text:
[Shaders] Have the base fragment shader use the vertex color

This PR has the base fragment shader for the examples use the vertex color in addition to the tint color. This provides a better example of what the default shader is doing.
I also added some more comments to the finalColor computation to explain what is happening.
If having the base shader ignore vertex color is intended in order to keep the shader simple, please reject this PR.

@JeffM2501 It was not added because, afair, usual meshes (obj) did not support vertex colors, so the base shader did not work as expected if multiplied by fragColor.
It was omitted for that reason but it can be at least commented the case, or add a commented line considering it, just in case vertColor is provided.

I believe all the meshes should support vertex color now, as well as anything from the batch system, so I don't think this will cause an issue.
The default shaders in rlgl do this same computation.
So if there was an issue with fragColor, it would show up in all the examples.

@JeffM2501 Yeah, agree... it was implemented long time ago so probably it was already addressed in other places of the code.

source: gharchive/pull-request


text:
Still showing MTL for LB5, 5.5

Just installed the most recent english translation, and the recollection quests for LB5 going on right now are clearly MTL. Tested on regular LB5.5 main quests and also saw MTL.
Isn't everything up to LB5.5 supposed to use the official NA script?

The recollection quests differ from the main quest (I think most? if not all? of the dialogue is the same, but they're placed different internally) and I don't currently have the time to fix that.
Up to 5.2 should be English in the main story.

Ok that makes sense. It's just that the README was saying up to 5.5 is using official NA script, hence the confusion.

authors: inboxes neobenedict

repo: rayshift/translatefgo

license: MIT


text:
Increasing UT coverage

Description
Added unit tests to increase unit test coverage
Fixes https://razorpay.atlassian.net/browse/METRO-158
Type of change

[x] Increasing test coverage

How Has This Been Tested?

[x] Running unit tests on local

Is it a breaking change?
No
Checklist:

[x] I have performed a self-review of my own code
[x] I have commented my code, particularly in hard-to-understand areas
[ ] I have made corresponding changes to the documentation
[x] My changes generate no new warnings
[x] I have added unit tests that prove my fix is effective or that my feature works (if applicable)
[ ] I have added integration tests for the new feature (if applicable)
[x] I have manually tested my code to the best of my abilities.

This is the first PR that attempts to increase the code coverage by 1.85%. I will create one more PR to increase it further to 65%

repo: razorpay/metro


text:
The prefix directory is not cleaned when reinstalling jruby-dev

I had a old jruby-dev on my system, installed by ruby-build jruby-dev ~/.rubies/jruby-dev.
Then I reinstalled the latest jruby-dev with the same command.
The result is there is a mix of old and new files, and so e.g. of old and new gems:
$ gem list

*** LOCAL GEMS ***

bundler (default: 2.2.29, default: 2.2.14)
cmath (default: 1.0.0)
csv (default: 3.1.2)
did_you_mean (1.3.0, 1.2.1)
e2mmap (default: 0.1.0)
ffi (default: 1.15.4 java, default: 1.15.1 java)
fileutils (default: 1.4.1)
forwardable (default: 1.2.0)
io-console (default: 0.5.9 java)
ipaddr (default: 1.2.2)
irb (default: 1.0.0)
jar-dependencies (default: 0.4.1)
jruby-launcher (1.1.19 java, 1.1.17 java)
jruby-openssl (default: 0.10.7 java, default: 0.10.5 java)
jruby-readline (default: 1.3.7 java)
json (default: 2.5.1 java)
logger (default: 1.3.0)
matrix (default: 0.3.0)
minitest (5.11.3)
mutex_m (default: 0.1.0)
net-telnet (0.1.1)
ostruct (default: 0.3.3, default: 0.1.0)
power_assert (1.1.3)
prime (default: 0.1.0)
psych (default: 3.3.2 java)
racc (default: 1.5.2 java)
rake (12.3.3)
rake-ant (default: 1.0.4)
rdoc (default: 6.1.2.1, default: 6.1.2)
rexml (default: 3.1.9.1, default: 3.1.9)
rss (default: 0.2.7)
rubygems-update (default: 3.2.29, default: 3.2.14)
scanf (default: 1.0.0)
shell (default: 0.7)
sync (default: 0.5.0)
test-unit (3.2.9)
thwait (default: 0.1.0)
tracer (default: 0.1.0)
webrick (default: 1.7.0)
xmlrpc (0.3.0)

(for comparison, here is the gem list after manual rm -rf ~/.rubies/jruby-dev and reinstalling with the same command)
I think it would be best to clear the destination directory if we detect it's a JRuby installation, similar to what's done for TruffleRuby: https://github.com/rbenv/ruby-build/blob/766e9c781f6898bd872a808e14c4afab39b16095/bin/ruby-build#L796-L807
@headius @enebo What do you think should happen in that case?

This used to be done for all build_package_copy Rubies no matter what was in the destination directory, but that's problematic for installing to /usr/local: https://github.com/rbenv/ruby-build/pull/1783

@headius @enebo Ping, could you share your opinion on the above?

@eregon Could we offload to the user the responsibility of removing the old installation files?
I'm not 100% sold on that JRuby and Truffleruby installation methods should do something "magic" and different from Ruby intallations.

In general we tell people never to share or reuse a gem directory across installs, which I think would apply in this case. We have never supported installing a new JRuby by overlaying a previous installation and would not expect it to work, even if it might by accident.

I'm not 100% sold on that JRuby and Truffleruby installation methods should do something "magic" and different from Ruby intallations.

I would say it's also a problem for CRuby (or any Ruby) to reuse an existing prefix, especially if it mixes gems like that and e.g. there are 2 "default" gem versions. If it's not gems it could be stdlib files which are still there even though they should be removed, etc.
The current logic is https://github.com/rbenv/ruby-build/blob/66311de0f8089564a232722a6b3db824b85235b3/bin/ruby-build#L806-L819. The only part really TruffleRuby-specific there is "detecting if it's a TruffleRuby prefix" but that could fairly easily be more portable if e.g. we pass the *ruby executable name to that function.
Maybe we should improve it to account for package managers installing /usr/bin/*ruby or /usr/local/bin/*ruby, where we still wouldn't want to rm -rf or override the files (e.g., we could have a list of such prefixes, there are not that many).
I think another possibility would be to just error out if trying to install to a non-empty directory, and then let the user remove that directory, or pass a flag to force installation to a non-empty directory, where they won't be able to cleanup properly after, if that's really what the user wants (e.g., /usr/local).
That would be less convenient for reinstalling dev versions though.
We could also just warn, but that could be easily missed and fixing that would mean the user cancelling the current build and retrying which seems messy.

This is a bigger issue for *-dev than releases, so another option would be to only rm -rf or error out for dev builds.
It could be an issue for a release too though if e.g. some gem has been messed up (e.g. half compiled in a broken state with a bad Makefile, or miscompiled by a bad XCode and segfaulting) it won't be cleaned up by reinstalling that release (assuming no GEM_HOME set, as with rbenv).

I dig the idea of scoping the fix to just *-dev builds. For non-dev build definitions, ruby-build should just respect the prefix given and install there regardless of what is currently present there. The user should be responsible for preparing the installation location in the way they see fit.
For *-dev builds we could error out if a bin/ruby already exists in the prefix directory, indicating the presence of a previous Ruby installation. Then the user could rm -rf the prefix directory themselves if they wanted to work around that.

As per my previous comment, I was open for a PR that changes behavior for *-dev builds, but since there was no chatter nor upvotes around this in the years since, I'm inclined to close this to clean out the backlog.
People building *-dev versions of Ruby are typically power users and I'm fine with the responsibility of a preemptive rm -rf being on their side.

I've had cases where e.g. the truffleruby installation was broken while working on the definition, and then not cleaning would result in pretty confusing behavior, and this could potentially happen to users of ruby-build too. So I think it's only for *-dev even though that's even more necessary.
I'm OK with things as they are (do this only for truffleruby), so yeah fine to close.

authors: eregon headius mislav

repo: rbenv/ruby-build

license: mit

license_source: bigquery


text:
The Ruby openssl extension was not compiled. Missing the OpenSSL lib?

rbenv install 2.0.0-p247 fails on Mac OS X 10.8.4 with the error:
The Ruby openssl extension was not compiled. Missing the OpenSSL lib?

I had no problem installing 1.9.3-p448.
Using ruby-build 20130628 via Homebrew.

@mislav I'd like to suggest a check based upon ldconfig -p | grep libssl as it is mentioned on this serverfault post.
If appreciated i'd like trying to create a pull-request for that issue.

@florianb That's a start, except it doesn't work on OS X.
Pull requests welcome of course.

sudo apt-get install libssl-dev works on ubuntu 15.04 :+1:

Some basic libs are required, recommend this:
sudo apt-get install git-core curl zlib1g-dev build-essential libssl-dev libreadline-dev libyaml-dev libsqlite3-dev sqlite3 libxml2-dev libxslt1-dev libcurl4-openssl-dev python-software-properties libffi-dev

I had problems trying to install Ruby 2.2.2 on Fedora 22, but the following worked for me:
dnf install openssl-devel
rbenv install 2.2.2
rbenv global 2.2.2

Ubuntu 14:
sudo apt-get install libssl-dev

patch worked for me when installing 2.2.2 and 2.2.3 on Arch using openssl 1.0.2.g-3

I'm sorry to say this but on macOS 10.12 with latest ruby-build this is still an issue. I brew installed openssl and I still have a hell of a time in making it play nice with rbenv install.
It's really unfortunate but this:
CONFIGURE_OPTS="--with-openssl-dir=`brew --prefix openssl`"

... worked ...

macOS 10.13 High Sierra Beta 2
CONFIGURE_OPTS="--with-openssl-dir=`brew --prefix openssl`" rbenv install 2.3.4
Thank you @hugobast

@hugobast
Will try your solution as well, I encountered same error during installation as well.

Hi, for Debian Stretch install
apt-get install libssl1.0-dev
not libssl-dev

Hi, for Debian Stretch and ruby 2.2.3 install:
apt-get install libssl1.0-dev
not libssl-dev, then apply this:
https://github.com/rbenv/ruby-build/issues/834#issuecomment-160627207

For macports, this worked for me...
RUBY_CONFIGURE_OPTS="--with-openssl-dir=/opt/local/" rbenv install 2.4.1

when I installed rbenv through brew, I got this message
This formula is keg-only, which means it was not symlinked into /usr/local,
because Apple has deprecated use of OpenSSL in favor of its own TLS and crypto libraries.

If you need to have this software first in your PATH run:
  echo 'export PATH="/usr/local/opt/openssl/bin:$PATH"' >> ~/.bash_profile

For compilers to find this software you may need to set:
    LDFLAGS:  -L/usr/local/opt/openssl/lib
    CPPFLAGS: -I/usr/local/opt/openssl/include

have you tried adding these flags to rbenv install?

using RUBY_CONFIGURE_OPTS=--with-openssl-dir=/usr/local/Cellar/openssl/[latest version] rbenv install [version] worked for me finally..

using RUBY_CONFIGURE_OPTS=--with-openssl-dir=/usr/local/Cellar/openssl/[latest version] rbenv install [version] worked for me finally..

Works for me. macOS 10.14.6

using RUBY_CONFIGURE_OPTS=--with-openssl-dir=/usr/local/Cellar/openssl/[latest version] rbenv install [version] worked for me finally..

First, thank you so much. I failed at the  beginning because I copied the commands above guys' . You help me out of the trouble.
Here the exactly what we should do:
ls /usr/local/Cellar/openssl/

I was having this issue with OSX 10.15.3. The version of openssl that homebrew installed was  1.1 and I was trying to install ruby 2.3.8, which did not work.
I eventually got it to work using openssl version 1.0.2.
RUBY_CONFIGURE_OPTS=--with-openssl-dir=/usr/local/Cellar/openssl/1.0.2 rbenv install 2.3.8

I had this issue and official rbenv documentation as well as installation of a new version of ruby (2.7.1) solved it.
https://github.com/rbenv/ruby-build/wiki#updating-ruby-build

authors: MilanVilov Superpencil TorvaldsDB andersonmills andreynering charneykaye defaye dubcl emckenna florianb garydamm gregorvand hugobast menjxo mingliangfeng mislav nathany wmpeng zackkenyon


text:
add connection::mysql_options function

so user can set mysql options, see #68

You probably did not mean to change 134 files? That's more than the repository even has :-)

MYSQL is a typedef name, if replace st_mysql with MYSQL, the compiler will say
In file included from /data/sqlpp11/sqlpp11-connector-mysql/src/connection.cpp:33:0:
/data/sqlpp11/sqlpp11-connector-mysql/include/sqlpp11/mysql/connection.h:39:8: error: using typedef-name ‘MYSQL’ after ‘struct’
 struct MYSQL;
        ^~~~~
In file included from /data/sqlpp11/sqlpp11-connector-mysql/src/detail/../sqlpp_mysql.h:30:0,
                 from /data/sqlpp11/sqlpp11-connector-mysql/src/detail/connection_handle.h:31,
                 from /data/sqlpp11/sqlpp11-connector-mysql/src/connection.cpp:29:
/usr/include/mysql/mysql.h:314:3: note: ‘MYSQL’ has a previous declaration here
 } MYSQL;
   ^~~~~
make[2]: *** [src/CMakeFiles/sqlpp-mysql.dir/connection.cpp.o] Error 1
make[1]: *** [src/CMakeFiles/sqlpp-mysql.dir/all] Error 2
make: *** [all] Error 2

Which version of mysql are you using? with mysql-8.0, st_mysql is undefined.

I'm using mysql++3.3.0

I'm using mysql-5.7, should we compile different code according to the macro MYSQL_SERVER_VERSION?

Yes, I assume that is necessary, see also src/sqlpp_mysql.h.
You might want to look at https://stackoverflow.com/questions/804894/forward-declaration-of-a-typedef-in-c, which would allow to keep the differences to a minimum

Nice! Thanks for pulling through.

authors: ZerQAQ rbock


text:
Api 2843 upgrade to openapi 3

Le converter utilisé par la lib historiquement gérait du swagger 2.0
Or avec notre authent par token JWT nous avions besoin des nouvelles fonctionnalités de la version open API 3.0 qui propose d'ajouter une authorization par token JWT
Cette PR permet de faire l'upgrade à la V3 en modifiant les champs necessaires.
Cette PR ajoute également le moyen de s'authentifié par JWT dans la UI de manière globale sinon 401 lors des call API

close this PR because not on the right repository

close this PR because not on the right repository

Re open to share our use case

Re open to share our use case

repo: rbren/fhir-swagger


text:
Allow dismiss() to be called silently

Provides an option for the user to suppress the "Cleared n Pending Notifications" notification.

LGTM thanks again! You've added .DS_Store file to your branch, please remove it before I merge thanks

authors: CKolkey rcarriga

repo: rcarriga/nvim-notify


text:
multi-page UI

Last Saturday @OPNO  suggested a multi-page UI. I said sure, some slides to look at would be great. I suggested playing "calendar bingo" and as I was leaving I heard "let's work on it right now."
The next I hear is today... I hear from @jimscarver  that not much happened in that session. Subsequently he and @SteveHenley  got together and tried at the HTML level. They had some build issues.
@TheoXD and I are not convinced that a multi-page UI is likely to be easier to use, but I encourage exploration.
I'm disappointed that build issues got in the way of what was expected to be slideware.

One could hide/grey out steps that are not yet active, it would work sort of like a multi-page. While making a multi-page UI will definitely help most people, we're not targetting a lot of people anyway (maybe 40-50 will vote out of 100, out of which many might be already familiar with the current UI)

I now have my visual studio code environment setup.  I took Rao's suggestion to remove the Jumbotron and make "RChain Annual Meeting Ballot" smaller.  Added ordered user instruction list while removing show me bubbles.  These changes are committed/ pushed to SteveHenley-patch-1.

ok... I see 79309cd , 3e420fd and such. They probably belong in their own PR; I can probably arrange that...
But they don't look relevant to a multi-page UI. It looks like you're ok to close this issue as wontfix. @OPNO how about you? Do you have anything tangible to share regarding a multi-page UI?

I don't have anything tangible to share as of yet. I was hoping to dust of
my html skills (or lack thereof - it's been a while) and get going with an
attempt this weekend. A single page with steps revealed as per Theo's
suggestion might be good too.
My thoughts are that "RVote" may be looked on as dual purpose: 1) allow
members to vote easily 2) show the outside world that we have voting on
chain in an easy to use interface even for blockchain/crypto virgins. 2)
doesn't necessarily have to share the same deadline as 1), so we could get
the UI satisfactory for the 50 - 100 members to vote at the AGM and then
continue working on the "general public" version to show the world at a
later date.
On Fri, Sep 25, 2020 at 1:06 PM Dan Connolly notifications@github.com
wrote:

ok... I see 79309cd
https://github.com/rchain-community/rv2020/commit/79309cdf7e0a8e6e49562b92891e3d217af0506a
, 3e420fd
https://github.com/rchain-community/rv2020/commit/3e420fd40808545ac05e261409cd7902e413e80a
and such. They probably belong in their own PR; I can probably arrange
that...
But they don't look relevant to a multi-page UI. It looks like you're ok
to close this issue as wontfix. @OPNO https://github.com/OPNO how about
you? Do you have anything tangible to share regarding a multi-page UI?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/rchain-community/rv2020/issues/81#issuecomment-699129619,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AIYSKTAYYVHI5NRQMGLZDA3SHTZ37ANCNFSM4RYUTG4A
.

--
https://www.rchain.coop/
http://www.darrylneudorf.com

Perhaps we could look at it as multi phase? -
phase 1 - get the MVP done for the AGM. (Maybe already done? - and perhaps
Steve H and I could work on a nice user friendly video walkthrough)
phase 2 - continue working on the user friendly "crypto/blockchain virgin"
UI, and prep a needs analysis for the Hackathon.
phase 3 - make it a Hackathon project with more hardened tamper proofing
and grandma friendly usability to potentially offer as an RChain open
source product for any entity that requires an on chain voting DApp, be
them a fellow co-op or other org or even a government.
On Fri, Sep 25, 2020 at 11:34 PM Darryl Neudorf dneudorf@gmail.com wrote:

I don't have anything tangible to share as of yet. I was hoping to dust of
my html skills (or lack thereof - it's been a while) and get going with an
attempt this weekend. A single page with steps revealed as per Theo's
suggestion might be good too.
My thoughts are that "RVote" may be looked on as dual purpose: 1) allow
members to vote easily 2) show the outside world that we have voting on
chain in an easy to use interface even for blockchain/crypto virgins. 2)
doesn't necessarily have to share the same deadline as 1), so we could get
the UI satisfactory for the 50 - 100 members to vote at the AGM and then
continue working on the "general public" version to show the world at a
later date.
On Fri, Sep 25, 2020 at 1:06 PM Dan Connolly notifications@github.com
wrote:

ok... I see 79309cd
https://github.com/rchain-community/rv2020/commit/79309cdf7e0a8e6e49562b92891e3d217af0506a
, 3e420fd
https://github.com/rchain-community/rv2020/commit/3e420fd40808545ac05e261409cd7902e413e80a
and such. They probably belong in their own PR; I can probably arrange
that...
But they don't look relevant to a multi-page UI. It looks like you're ok
to close this issue as wontfix. @OPNO https://github.com/OPNO how
about you? Do you have anything tangible to share regarding a multi-page UI?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/rchain-community/rv2020/issues/81#issuecomment-699129619,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AIYSKTAYYVHI5NRQMGLZDA3SHTZ37ANCNFSM4RYUTG4A
.

--
https://www.rchain.coop/
http://www.darrylneudorf.com

--
https://www.rchain.coop/
http://www.darrylneudorf.com

I don't have anything tangible to share as of yet. I was hoping to dust of my html skills (or lack thereof - it's been a while) and get going with an attempt this weekend.

You did hear me suggest slides, right? I'm not sure why everybody is putting HTML tooling in the way of UI brainstorming. Half an hour with google slides should be enough to have an extremely rough sketch to share. By way of example, see the discussion starting with https://github.com/rchain-community/rv2020/issues/63#issuecomment-692340821

... 2) doesn't necessarily have to share the same deadline as 1)

OK... then I'll leave this open but leave it off the gov-1 milestone.

Anyone who makes tangible progress on this is welcome to re-open this issue.

authors: OPNO SteveHenley TheoXD dckc


text:
Adds flattentypes2 pass

This preserves multi-dimensional arrays of bit/bits in the flattening
pass (so we can code generate multi-dimensional arrays in verilog).  I
was originally going to call this "flattentuples", but it's not quite
that because if we have an array of tuples, we do the old flattening
process, so there are still some arrays that are flattened.  I think one
way to handle this might be to have a pass before this that transforms
arrays of tuples into tuples of arrays, so for now I'll check this
version in since this will get us started with the common case
(multi-dimensional array of bits) and leave the multi-dimensional
array of tuple case for later.

Mainly for backwards compatibility, I didn't want to cause a breaking change for existing code.  I could see about making this an option with it off by default, but I think the original flatten types behavior should be preserved and maybe gracefully deprecated.


text:
Reduce the size of ensembles on disk

... especially but not only if we need to increase the number of plans collected.
There are 3 levels to this:

Using a more compact index representations of precinct geoids and district ids that track back to the user-friendly versions
Storing successive plans as deltas from the previous plan incrementally -- I can currently "pack" an ensemble in this way but only as a batch process after an ensemble is stored on disk which is how it currently needs to be stored in order to be read back in
Zipping the resulting file -- i.e., store the unzipped file in a temp location and zip it

Then reverse the process when reading an ensemble from disk.
This would allow us to store much larger ensembles in GitHub w/o having to resort to LFS (which can be very tricky, in my experience) and reduce transfer times (back from the cluster).

The maximum number of precincts is CA with 25,607. The maximum number of districts is the PA state house with 203.

repo: rdatools/rdabase


text:
Generated Normals by glTFRuntime always inverse.

I use this setting ....
SkeletalMeshConfig.NormalsGenerationStrategy = EglTFRuntimeNormalsGenerationStrategy::Always;
So. It should be said that the generated normal is reversed.
PS :I traced the normal output in the debug output and found that it exists, but I don't know why it ends up being inverted.
Thanks a lot
2gltf.zip

Hi, i cannot reproduce the problem, normals looks definitely good:

Are you sure you are not changing the base matrix of the object in the loaderconfig ? This can potentially inverts the winding

Thanks for your reply .
FglTFRuntimeConfig Object?
I use it by default value :
FglTFRuntimeConfig glTF_cfg;
UglTFRuntimeAsset* asset = UglTFRuntimeFunctionLibrary::glTFLoadAssetFromFilename(glTFPath, relativePath, glTF_cfg);
Can you sent it your param config?
Thanks again.

authors: rdeioris unsanedingding

repo: rdeioris/glTFRuntime-docs


text:
How to run this application?

$ rake server
rake aborted!
Don't know how to build task 'server'
(See full trace by running task with --trace)
$ which rake
/home/mh/.rvm/rubies/ruby-2.3.1/bin/rake
$ rake --version
rake, version 10.4.2
$ pip install rake
Collecting rake
Using cached rake-1.0.tar.gz
Complete output from command python setup.py egg_info:
running egg_info
creating pip-egg-info/rake.egg-info
writing requirements to pip-egg-info/rake.egg-info/requires.txt
writing pip-egg-info/rake.egg-info/PKG-INFO
writing namespace_packages to pip-egg-info/rake.egg-info/namespace_packages.txt
writing top-level names to pip-egg-info/rake.egg-info/top_level.txt
writing dependency_links to pip-egg-info/rake.egg-info/dependency_links.txt
writing manifest file 'pip-egg-info/rake.egg-info/SOURCES.txt'
error: Namespace package problem: rake is a namespace package, but its
init.py does not call declare_namespace()! Please fix it.
(See the setuptools manual under "Namespace Packages" for details.)
"
----------------------------------------

Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-1G6Rzx/rake/

Ah, sorry, looks like a typo in the readme. Try rake serve instead ofrake server
I've updated the readme too.

rake serve throws a different error:
python -m web.template --compile templates
python pycryptics/crypticweb/server.py
Traceback (most recent call last):
File "pycryptics/crypticweb/server.py", line 2, in
from pycryptics.solve_clue import CrypticClueSolver, split_clue_text
ImportError: No module named pycryptics.solve_clue
rake aborted!
Command failed with status (1): [python pycryptics/crypticweb/server.py...]
/home/mh/Code/Python/cryptics/Rakefile:16:in `block in <top (required)>'
Tasks: TOP => serve
(See full trace by running task with --trace)

That's odd. I just a clean install following the instructions from the Readme and everything is working. What Python version are you using, and what folder are you running rake serve from?

cryptics $ python --version
Python 2.7.12
Cloned the repository, followed the instructions. Running rake serve from cryptics folder, using Python 2.7.12, the error is:
cryptics $ rake serve
python -m web.template --compile templates
python pycryptics/crypticweb/server.py
Traceback (most recent call last):
File "pycryptics/crypticweb/server.py", line 2, in
from pycryptics.solve_clue import CrypticClueSolver, split_clue_text
ImportError: No module named pycryptics.solve_clue
rake aborted!
Command failed with status (1): [python pycryptics/crypticweb/server.py...]
/home/mh/Code/Python/cryptics/Rakefile:16:in `block in <top (required)>'
Tasks: TOP => serve
(See full trace by running task with --trace)
Pls note: I am not using virtualenv

I'm very confused why this isn't working for you. Can you please try adding the cryptics folder (that is, the folder which contains pycryptics) to your pythonpath? E.g.
export PYTHONPATH="$PYTHONPATH:/path/to/wherever/you/downloaded/cryptics"

Yes, it was PYTHONPATH. The value was not set.
$ echo $PYTHONPATH
$ export PYTHONPATH="/home/mh/Code/Python/cryptics"
$ rake serve
python -m web.template --compile templates
python pycryptics/crypticweb/server.py
Loading indicators from file...
...done.
Starting up server. Press Ctrl+c to shut down
http://0.0.0.0:8080/
127.0.0.1:55908 - - [17/Oct/2017 16:51:43] "HTTP/1.1 GET /" - 200 OK

authors: mh-github rdeits

repo: rdeits/cryptics


text:
[RDK-29360] Add --westeros-socket option

Add the ability to pass a westeros socket path as an option when starting a container. The socket is then bind-mounted into the container with the following config:
        {
            "source": "/tmp/westeros-0",
            "destination": "/tmp/westeros",
            "options": [
                "bind",
                "rw",
                "nosuid",
                "nodev",
                "noexec"
            ],
            "type": "bind"
        }

Usage:
DobbyTool start --westeros-socket /tmp/westeros sleep ./sleepy

LGTM

authors: Anttikyll TeknoVenus

repo: rdkcentral/Dobby


text:
REFPLTV-1925: mfgserialnumber not obtained for org.rdk.System.1.getMfgSerialNumber API

REFPLTV-1925: mfgserialnumber not obtained for org.rdk.System.1.getMfgSerialNumber API
Reason for change: Added the getMfgSerialNumber support for RPI.
Test Procedure: Build and verify.
Risks: Low
Signed-off-by: Dineshkumar_Periyasamy@comcast.com

Closing older PRs. Pls bring it to latest sprint/main branches if required.

authors: DineshkumarJP anand-ky

repo: rdkcentral/rdkservices


text:
add support for the CXSMILES extensions to the SMARTS parser

This requires adding a form of the SMARTS parser that takes a parameters object (like the SmilesParserParams)

Duplicate to #4319

repo: rdkit/rdkit


text:
Select row checkbox error

This is my configuration:
selectRow={{
mode: 'checkbox',
clickToSelect: true,
classes: 'selection-table-row',
onSelect: (rowKey, checked, rowIndex) => {
debugger;
},
onSelectAll: (option) => {
debugger;
}
}}
Error is:
Warning: Failed prop type: You provided a checked prop to a form field without an onChange handler. This will render a read-only field. If the field should be mutable use defaultChecked. Otherwise, set either onChange or readOnly.
in input (created by CheckBox)
in CheckBox (created by SelectionHeaderCell)
in th (created by SelectionHeaderCell)
in SelectionHeaderCell (created by Header)
in tr (created by Header)
in thead (created by Header)
in Header (created by BootstrapTable)
in table (created by BootstrapTable)
in div (created by BootstrapTable)
in BootstrapTable (created by PaginationWrapper)
in PaginationWrapper (created by SortWrapper)
in SortWrapper (created by CellEditWrapper)
in CellEditWrapper (created by RowSelectionWrapper)
in RowSelectionWrapper (created by BootstrapTableContainer)
in BootstrapTableContainer (created by Users)
in div (created by Users)
in Users (created by Route)
in Route (created by Full)
in Switch (created by Full)
in div (created by Container)
in Container (created by Full)
in main (created by Full)
in div (created by Full)
in div (created by Full)
in Full (created by Route)
in Route (created by IsLoggedInSwitch)
in Switch (created by IsLoggedInSwitch)
in IsLoggedInSwitch
in Switch
in Router (created by HashRouter)
in HashRouter
in div

@matteoventuri7 I cant reproduce this issue, did I miss something?

Now i don't use checkbox and receive this warning:
Warning: TextFilter contains an input of type text with both value and defaultValue props. Input elements must be either controlled or uncontrolled (specify either the value prop, or the defaultValue prop, but not both). Decide between using a controlled or uncontrolled input element and remove one of these props. More info: https://fb.me/react-controlled-components

This my versions:
"react": "16.2.0",
"react-bootstrap-table-next": "^0.1.2",
"react-bootstrap-table2-editor": "^0.1.1",
"react-bootstrap-table2-filter": "^0.1.2",
"react-bootstrap-table2-paginator": "^0.1.1",

@matteoventuri7 update to react-bootstrap-table2-filter@0.1.3

Hi, i using react-bootstrap-table2-filter@0.1.3 and still get the warning for uncontrolled component... only when set mode to checkbox, if change to radio the warning gone away...

had the same issue until I added
 selected: false,
in the
  const selectRowLinks = {
    mode: 'checkbox',
    clickToSelect: true,
    clickToEdit: true,
    selected: false,
.....
  };

Having the same issue, when the table is paginated, if you select rows with checkboxes, between pages, at page change you will get this error.
I think the problem is in the implementation of checked state in rows.

I get the same error:
Failed prop type: You provided a checked prop to a form field without an onChange handler. This will render a read-only field. If the field should be mutable use defaultChecked. Otherwise, set either onChange or readOnly
The warning shows:
in input (created by CheckBox)
in CheckBox (created by SelectionHeaderCell)
in th (created by SelectionHeaderCell)
in SelectionHeaderCell (created by Header)
in tr (created by Header)
in thead (created by Header)
in Header (created by BootstrapTable)
in table (created by BootstrapTable)
in div (created by BootstrapTable)
in BootstrapTable (created by CellEditWrapper)
in CellEditWrapper (created by RowSelectionWrapper)
in RowSelectionWrapper (created by Table)
in Table (created by Table)
in Table (created by AppDefaultTable)
in div (created by AppDefaultTable)
in AppDefaultTable (created by Table)
in Table (created by Page)
in div (created by Row)
in div (created by Row)
in div (created by Row)
in article (created by Row)
in div (created by Row)
in Row (created by Page)
in section (created by PageLayout)
in PageLayout (created by Page)
in Page (created by Connect(Page))
in Connect(Page) (created by Route)
in Route (created by App)
in Router (created by BrowserRouter)
in BrowserRouter (created by App)
in Provider (created by App)
in App

Exactly same warning:
Warning: Failed prop type: You provided a `checked` prop to a form field without an `onChange` handler. This will render a read-only field. If the field should be mutable use `defaultChecked`. Otherwise, set either `onChange` or `readOnly`.
    in input (created by CheckBox)
    in CheckBox (created by SelectionHeaderCell)
    in th (created by SelectionHeaderCell)
    in SelectionHeaderCell (created by Header)
    in tr (created by Header)
    in thead (created by Header)
    in Header (created by BootstrapTable)
    in table (created by BootstrapTable)
    in div (created by BootstrapTable)
    in BootstrapTable (created by PaginationWrapper)
    in PaginationWrapper (created by SortWrapper)
    in SortWrapper (created by CellEditWrapper)
    in CellEditWrapper (created by RowSelectionWrapper)
    in RowSelectionWrapper (created by BootstrapTableContainer)
    in BootstrapTableContainer (created by GraphView)
    in div (created by GraphView)
    in GraphView (created by ProjectDetail)
    in div (created by Col)
    in Col (created by ProjectDetail)
    in div (created by Row)
    in Row (created by ProjectDetail)
    in div (created by TabPane)
    in TabPane (created by ProjectDetail)
    in div (created by TabContent)
    in TabContent (created by ProjectDetail)
    in div (created by CardBody)
    in CardBody (created by ProjectDetail)
    in div (created by Card)
    in Card (created by ProjectDetail)
    in div (created by ProjectDetail)
    in ProjectDetail (created by Route)
    in Route (created by Projects)
    in Switch (created by Projects)
    in div (created by Container)
    in Container (created by Projects)
    in main (created by Projects)
    in div (created by Projects)
    in div (created by Projects)
    in Projects (created by Route)
    in Route
    in Switch
    in Router (created by BrowserRouter)
    in BrowserRouter

My app is having following versions:
node@v6.10.2

"react": "16.2.0",
"react-bootstrap-table-next": "^0.1.14",
"react-bootstrap-table2-editor": "^0.2.1",
"react-bootstrap-table2-filter": "^0.3.0",
"react-bootstrap-table2-paginator": "^0.1.5",

authors: AllenFang CDimonaco EnriqueAbricot Northshoot cbfrank matteoventuri7 sisodiakaran


text:
[São Paulo/SP] Carlos Alves

Nome completo
José Carlos Alves Lopes.
Localidade
São Paulo - SP
Apresentação
Sou desenvolvedor Full Stack com foco maior no Front-End e estudante no 5° Semestre de Gestão da Tecnologia da Informação na Fatec de Itaquaquecetuba. Moro no distrito São Miguel Paulista. Sou junior e estou obtendo meus primeiros conhecimentos em React e Ruby on Rails.
Outras Informações
Tenho disponibilidade para trabalho remoto, ou alocado na zona leste do estado de São Paulo. Enquanto aos horários, procuro um estágio com jornada de no máximo 6h, estou disponível em meio período na parte da tarde e/ou noite, devido a minha faculdade.
Especialidades

JavaScript / Node JS
HTML
SASS
Versionamento de Código
React
Python
Ruby
SQL
Figma

Tempo de experiência em TI (Não necessáriamente Front-end/React)

[x] < 1 ano
[ ] > 1 ano
[ ] > 2 anos
[ ] > 5 anos

Nível

Tipo de contratação

[ ] PJ
[x] CLT
[x] Freela

Tipo de trabalho

[x] Remoto - Parcial
[x] Remoto - Total
[x] Alocado

Contato
https://www.linkedin.com/in/josecarlos98
Site
carlosalves.now.sh
github.com/eucarlos
dribbble.com/eucarlos

Sim, ainda estou

repo: react-brasil/me-contrata


text:
Create Custom Animate between Screens

I need create Custom Animate .
i found this documentation but i think it's wrong
https://github.com/react-community/react-navigation/blob/aead8ff9fbd2aceb2d06c8049c8ad0d55d77b5ab/docs/api/views/Transitioner.md
Transitioner need props navigation
navigation: PropTypes.shape({
  state: NavigationPropTypes.navigationState.isRequired,
}).isRequired,

Anyone can  help me
Thanks

You're right it looks like the docs are out of date on this. Would you mind submitting a pull request to fix them?
Custom animations are possible now, but we may be able to improve the API. Feel free to open issues if you have suggestions. Right now, you can implement your own card stack, but hopefully we will eventually make it easier to customize the behavior of CardStack

@ericvicenti
to create custom animate we need use cardStack ?
navigationOptions = {   cardStack: {     transition: (previousRoute: Route) => {       // configure the animation here     }   }, }

I am closing this in favor of #124

authors: Kottidev ericvicenti grabbou

repo: react-community/react-navigation


text:
Problem overriding router for built-in navigators

Overriding the router for StackNavigator and TabNavigator doesn't seem to work. NavigationContainer exposes router as a static property but this is never used internally, instead Component.router is used. Am I missing something obvious here?

hey @abergenw soo to override routers, you need to do something like this:
const WelcomeNavigator = StackNavigator({
  Main: { screen: MainScreen },
  Login: { screen: LoginScreen },
  Register: { screen: RegisterNavigator }
}, {
  headerMode: 'none'
});

const WelcomeRouter = WelcomeNavigator.router;
WelcomeNavigator.router = {
  ...WelcomeNavigator.router,
  getStateForAction(action, state) {
    // Add in custom action handlers / hooks here ie. logging
    console.log('getStateForAction router', action, state);

    // reuse default router getStateForAction (optional, only needed if want to extend and not replace)
    return WelcomeRouter.getStateForAction(action, state);
  }
}

Hope this helps.

According to the documentation this should work but it doesn't. The problem seems to be the fact that NavigationContainer (if stateful) uses the static router set on the wrapped component instead of the static router set on itself. Of course I can manipulate the router instance of NavigationContainer.router but simply setting a new router does not work.
Here's a snippet from createNavigationContainer.js illustrating how router is accessed.
class NavigationContainer extends React.Component {
    state: State;
    props: Props;

    subs: ?{
      remove: () => void,
    } = null;

    static router = Component.router;

    _isStateful: () => boolean = () => {
      const hasNavProp = !!this.props.navigation;
      if (hasNavProp) {
        invariant(
          !containerConfig,
          'This navigator has a container config AND a navigation prop, so it is ' +
          'unclear if it should own its own state. Remove the containerConfig ' +
          'if the navigator should get its state from the navigation prop. If the ' +
          'navigator should maintain its own state, do not pass a navigation prop.'
        );
        return false;
      }
      return true;
    }

    constructor(props: Props) {
      super(props);
      this.state = {
        nav: this._isStateful()
          ? Component.router.getStateForAction(NavigationActions.init())
          : null,
      };
    }

Are you saying that you want to override the default router so the built in navigators use it on init? Im having trouble understanding whats wrong with modifying the instance only.

Ok now I see what's wrong here. I'm transpiling from Typescript which results in let a = {...b, c} being transpiled to let a = Object.assign({}, b, c). This is why the example code didn't work for me and lead me to believe there was a bug. So the idea is to modify the instance, roger that.
Just out of curiosity, is NavigationContainer using Component.router instead of NavigationContainer.router to make sure that the router set on the actual component is being used instead of the one set on NavigationContainer? I guess this is ok but it's sort of misleading that setting the static router property on a navigator doesn't work if it's wrapped with NavigationContainer.
Cheers!

which results in let a = {...b, c} being transpiled to let a = Object.assign({}, b, c).

It's the same in ESNext too. You need to assign the variable yourself.

authors: ElliottJRo abergenw satya164


text:
Invariant Violation: Expected drag drop context find when deploy to server in minimal CodeSandbox

Describe the bug
I'm running the following code in a sandbox
import { useDrag, useDrop, DndProvider } from "react-dnd";
import { HTML5Backend } from "react-dnd-html5-backend";

export default function App() {
  var matchDrag = useDrag({
    type: "FILE"
  });
  var matchDrop = useDrop({
    accept: "FILE",
    drop: function (item, monitor) {
      console.log("dropped");
    }
  });

  return (

Hello CodeSandbox

      <DndProvider backend={HTML5Backend}>

Drag

      </DndProvider>
      <DndProvider backend={HTML5Backend}>

Drop

      </DndProvider>

Start editing to see some magic happen!

  );
}

When I run it, it triggers this issue: Uncaught Invariant Violation: Expected drag drop context.
Reproduction
Live Reproduction
Expected behavior
It should allow the drag item to be dropped into the drop div.
Screenshots

Desktop (please complete the following information):

OSX
firefox

Found it!
DndProvider has to be external of the component in which useDrag / useDrop hooks are used. It should be factored out of the App component like so:
<DndProvider backend={HTML5Backend}>
  <App />
</DndProvider>

If you have recently updated react or any other packages, sometimes there is a version mismatches in lock file. Its best to regenerate lock file(watch out for peer dependencies) and see if that fixes the issue.

repo: react-dnd/react-dnd


text:
react-native run-android return build faild

i try to use this library but get this error when isearched  the url it returns 404 error
what can i do?

What went wrong:
Could not resolve all files for configuration ':react-native-device-info:debugCompileClasspath'. Could not find support-media-compat.jar (com.android.support:support-media-compat:28.0.0).
Searched in the following locations:
https://dl.google.com/dl/android/maven2/com/android/support/support-media-compat/28.0.0/support-media-compat-28.0.0.jar

information
RN version: 0.59.8
platform: android
device_info version: 2.0.0

1 - is to always try the example app, if it works, it is proof your project has linked or otherwise integrated it incorrectly
2 - my guess (assuming 1 above shows it works) is that you have incorrect gradle dependency versions. Your ext { } block in the top-level gradle should look similar to the examples

1 - is to always try the example app, if it works, it is proof your project has linked or otherwise integrated it incorrectly
2 - my guess (assuming 1 above shows it works) is that you have incorrect gradle dependency versions. Your ext { } block in the top-level gradle should look similar to the examples

The gradle dependencies are the same but I still can not run my project. How can I fix it?

You may have some other dependency causing problems. The Play Services breaking change is massive and disrupting many people
here is how to find the dependency causing you trouble, then hopefully they will respect a version in android/build.gradle ext{} block https://github.com/react-native-community/react-native-device-info/pull/693#issuecomment-503142535

authors: HadisSharif mikehardy sootood


text:
Only works around  ?

I'm trying to use LinearGradient as a background, but it won't appear unless there is a text component directly in it.
Is it possible to make it fill in all of the screen space with flex: 1?
Even width: 100, height: 100 doesn't seem to do anything.

Here's a minimal example I used to create a flex: 1 gradient component without children that works on both Android and iOS. Could you please try to reproduce the problem with the following example using the latest stable version of react-native and react-native-linear-gradient?
import React from 'react';
import {
  AppRegistry,
  StyleSheet,
  View,
} from 'react-native';
import LinearGradient from 'react-native-linear-gradient';

const App = () => (
  <LinearGradient
    colors={['red', 'blue']}
    style={styles.gradient}
  />
);

const styles = StyleSheet.create({
  gradient: {
    flex: 1,
  },
});

AppRegistry.registerComponent('ExampleApp', () => App);

Here's a screenshot:

Running exactly your code on React Native 0.27 I get the following result:

Whoops, nevermind :) Forgot to rebuild the iOS project...
Weird that there's no warning for that.

Hey! I'm closing this since this is a stale issue. If you believe it's still relevant to fix, post a comment and I'll reopen.

authors: Mark2xv blakeandrewwood dgladkov radex


text:
Debug in Offline mode

Can anyone please advice the right procedure to debug the App in offline mode?

Unfortunately, it's a little tricky to do this as the Chrome debugger works over the Wifi. You could look into either using the Safari JSContext debugger or you might be able to debug on Android it it uses an adb port forward instead of the Wifi.

authors: iosfitness matt-oakes


text:
Video never play

I'm using version 0.9.0, because my proyect has a 0.39 react version.
This is my config.
import Video from 'react-native-video';
<Video
   source={{ uri: videoUrl }} -> i'm sure that this `url` is valid and mp4 format
   style={styles.videoSt}
   paused={false}/>

Inside my app:

The red area is the <Video>, but only can see that.. not show controls or some image
Please help

having the same problem in react native 44.2

Im having the same issue, I narrow it down to the display zoom settings on the iPhone.
Can you guys check if you have your display zoomed? This only happens on iPhone 6 and greater iPhone 5 has no display zoom option.
Settings -> Display & Brightness -> View
For me after I set up the zoom option it wont work, if I rollback to the standard option still wont work. Already uninstalled the app and rebooted the device with no luck.

In my case I added all the callbacks and there is no error called. The onStartLoad, onLoad onEnd and onProgress are all working, but the video still not showing.

<Video
  source={{ uri: videoUrl }}
  resizeMode="cover"
  repeat={true}
  muted={false}
/>

This is my code, and the video still not working

I'm probably a rare user on iPod Touch and an iPad. No option for zoom on either.
No video playing on either of them.

It's a shame to have had to abandon this module, in the end I had to add an html with a video tag to a webview.

@jose920405 how you did it?

hi @theBliz unfortunately this method could not be done. I had to resort to a webview with the source of the video embedded in the html.
let htmlString = `<!DOCTYPE html><html><body> <video id=\"videoId\" webkit-playsinline=\"true\" playsinline=\"true\" autoplay> <source src=\"${videoUrl}\" type=\"video/mp4\" /> </video></body></html>`;

<WebView
                key={key}
                source={{ html: htmlString }}
                style={{ width: screen.width, flex: 1 }}
            />

I am also facing the same issue on android. No video is getting loaded.
I am using
react-native: 0.43.4
react-native-video: 1.0.0
My code is
     <Video source={{uri: "youtube-url"}}   // Can be a URL or a local file.
       ref={(ref) => {
         this.player = ref
       }}                                      // Store reference
       rate={1.0}                              // 0 is paused, 1 is normal.
       volume={1.0}                            // 0 is muted, 1 is normal.
       muted={false}                           // Mutes the audio entirely.
       paused={false}                          // Pauses playback entirely.
       resizeMode="cover"                      // Fill the whole screen at aspect ratio.*
       repeat={true}                           // Repeat forever.
       playInBackground={false}                // Audio continues to play when app entering background.
       playWhenInactive={false}                // [iOS] Video continues to play when control or notification center are shown.
       ignoreSilentSwitch={"ignore"}           // [iOS] ignore | obey - When 'ignore', audio will still play with the iOS hard silent switch set to silent. When 'obey', audio will toggle with the switch. When not specified, will inherit audio settings as usual.
       progressUpdateInterval={250.0}          // [iOS] Interval to fire onProgress (default to ~250ms)
       onLoadStart={(el)=>console.log("video is being loaded",el)}            // Callback when video starts to load
       onLoad={()=>console.log("video loading")}               // Callback when video loads
       onProgress={()=>console.log("video loading is in progress")}               // Callback every ~250ms with currentTime
       onEnd={()=>console.log("video is now loaded")}                      // Callback when playback finishes
       onError={()=>console.log("video can not be loaded")}               // Callback when video cannot be loaded
       onBuffer={()=>console.log("buffer stage")}                // Callback when remote video is buffering
       onTimedMetadata={()=>console.log("metadata received")}  // Callback when the stream receive some metadata
       style={()=>styles.videoPlayer} />

Only "onLoadStart" prop is getting triggered, no error is coming.

@jose920405 I also tried webview, but the problem I am facing that whole youtube interface is getting loaded in webview. When I open a youtube video inside webview which is again inside a card, if someone scroll in this card, whole youtube interface is getting displayed, which I don't want. I want to display only video.

Any Solution for this issue?
I am getting error in android 4.4 and less, and the same code working fine on android 5.0 and above.
 java.io.IOException: Prepare failed.: status=0x1  W/System.err:     at android.media.MediaPlayer.prepare(Native Method) com.yqritc.scalablevideoview.ScalableVideoView.prepare(ScalableVideoView.java:171) com.brentvatne.react.ReactVideoView.setSrc(ReactVideoView.java:300) com.brentvatne.react.ReactVideoView.setSrc(ReactVideoView.java:202) com.brentvatne.react.ReactVideoViewManager.setSrc(ReactVideoViewManager.java:92)

just give the style of the video fixed width and height and it will work

anybody?please help :((

@jose920405 does your video auto play works?

I never went back to work in this case. My last answer was what worked for me

@lsorin81 thanks man. your last comment worked for me.

just give the style of the video fixed width and height and it will work

on api 24 if i also add an aspect ratio, the video will suddenly appear, how interesting....

authors: JBerendes jose920405 lsorin81 parisaabasian paulomogollon petrosmm satyamatwork sivakumar-cf sudhanshu6247 theBliz


text:
fix(ios): don’t divide by zero

Fixes https://github.com/react-native-community/react-native-viewpager/issues/207

Hey @gabrielbull ,
Thank you for your contribution and time spent on fixing this issue. I have tested your branch and LGTM.

authors: gabrielbull troZee


text:
Jest + Geolocation = Error

Environment

System:
    OS: macOS 10.14.5
    CPU: (8) x64 Intel(R) Core(TM) i7-4870HQ CPU @ 2.50GHz
    Memory: 1.33 GB / 16.00 GB
    Shell: 3.2.57 - /bin/bash
  Binaries:
    Node: 10.15.1 - /usr/local/bin/node
    Yarn: 1.13.0 - /usr/local/bin/yarn
    npm: 6.10.1 - /usr/local/bin/npm
    Watchman: 4.9.0 - /usr/local/bin/watchman
  SDKs:
    iOS SDK:
      Platforms: iOS 12.2, macOS 10.14, tvOS 12.2, watchOS 5.2
    Android SDK:
      API Levels: 25, 28
      Build Tools: 28.0.3
  IDEs:
    Android Studio: 3.4 AI-183.6156.11.34.5522156
    Xcode: 10.2.1/10E1001 - /usr/bin/xcodebuild
  npmPackages:
    react: 16.8.6 => 16.8.6
    react-native: 0.60.3 => 0.60.3
  npmGlobalPackages:
    react-native-cli: 2.0.1

Platforms

Jest - Android and iOS working
Versions

Android: 28
iOS: -
react-native-geolocation: 1.4.2
react-native: 0.60.3
react: 16.8.6

Description

After adding Geolocation to the Project the tests are working. Import Geolocation and use it somewhere will fail the test. The test is standard of the CLI-Init project.
All other files are the ones which will be generated automatically.
Linking and everthing is right as far as I can tell.
Reproducible Demo

Create a RN-App CLI: react-native init Repo1
Add RN-Geolocation: yarn add @react-native-community/geolocation
Link it
Add Geolocation to a View e.g.:

class App extends React.Component {

  state = {
		longitude: null,
		latitude: null,
	}

	componentDidMount() {
		//PermissionsAndroid.request(
		//	PermissionsAndroid.PERMISSIONS.ACCESS_FINE_LOCATION,
		//	{
		//	  title: "Location Accessing Permission",
		//	  message: "App needs access to your location"
		//	}
		//);
		Geolocation.getCurrentPosition(
			(success) => {
				this.setState(
					{longitude: success.coords.longitude,
					latitude: success.coords.latitude}
				)
			},
			(err) => {console.log(err);}
		);
	}

	// https://facebook.github.io/react-native/docs/geolocation#getcurrentposition
	render(){
		return (
			<View>
				<Text>Latitude: {this.state.latitude}</Text>
				<Text>Longitude: {this.state.longitude}</Text>
			</View>
		)
	}

};

Last Step: run yarn test and the following Error appears:
yarn test
yarn run v1.13.0
$ jest
 FAIL  __tests__/App-test.js
  ● Test suite failed to run

    @react-native-community/geolocation: NativeModule.RNCGeolocation is null. To fix this issue try these steps:
    • Run `react-native link @react-native-community/geolocation` in the project root.
    • Rebuild and re-run the app.
    • If you are using CocoaPods on iOS, run `pod install` in the `ios` directory and then rebuild and re-run the app. You may also need to re-open Xcode to get the new pods.
    If none of these fix the issue, please open an issue on the Github repository: https://github.com/react-native-community/react-native-geolocation

      at Object.<anonymous> (node_modules/@react-native-community/geolocation/lib/commonjs/nativeInterface.js:17:9)
      at Object.<anonymous> (node_modules/@react-native-community/geolocation/lib/commonjs/implementation.native.js:11:1)

Test Suites: 1 failed, 1 total
Tests:       0 total
Snapshots:   0 total
Time:        3.145s
Ran all test suites.
error Command failed with exit code 1.

Githublink for an example: https://github.com/SergejDK/ReactNativeJestGeolocationRepo

Hey @SergejDK 	, you need to mock the RNCGeolocation native module. Create a folder __mocks__ on the root level. Inside already created folder create another folder @react-native-community and within that folder create a file called geolocation.js, where you have to specify mocks:
export default {
  addListener: jest.fn(),
  getCurrentPosition: jest.fn(),
  removeListeners: jest.fn(),
  requestAuthorization: jest.fn(),
  setConfiguration: jest.fn(),
  startObserving: jest.fn(),
  stopObserving: jest.fn()
};

Folders structure should look like:
.
├── __mocks__/
│   │── @react-native-community/
│   	| -- geolocation.js

@lukewalczak
Thanks that's working! But why do we need to do this?

@lukewalczak I would also like to know why this is necessary.

From my understanding loading the library without a mock causes it to attempt to load its native counterpart from either iOS or android. Because you are not running the tests on either of those, this loading causes them to fall. When providing a mock this way however, there is no attempt being made to access something that cannot be accessed.

Hey @SergejDK , you need to mock the RNCGeolocation native module. Create a folder __mocks__ on the root level. Inside already created folder create another folder @react-native-community and within that folder create a file called geolocation.js, where you have to specify mocks:
export default {
  addListener: jest.fn(),
  getCurrentPosition: jest.fn(),
  removeListeners: jest.fn(),
  requestAuthorization: jest.fn(),
  setConfiguration: jest.fn(),
  startObserving: jest.fn(),
  stopObserving: jest.fn()
};

Folders structure should look like:
.
├── __mocks__/
│   │── @react-native-community/
│   	| -- geolocation.js

hero. thank you!

@darran-kelinske-fivestars did that work for you on Detox without any further configuration?
I'm trying to mock a node_module using that technic (react-native-image-crop-picker in my case) but when I run the tests Detox loads the original module rather than the mock.

Perhaps this should be added to readme? Jest is a pretty common testing framework and others might also run into this issue.

There really should be a mock file in the package that we simply can call to jest.mock(), so we don't have to memorize the package signature (function names, variables, etc). Especially if that changes! Please re-open and create a mock file for us that can internally be maintained!

For those using https://github.com/Agontuk/react-native-geolocation-service, the mock file should reside here:
├── __mocks__/
│   │── react-native-geolocation-service/
│   	| -- index.js

authors: SergejDK ajfranzoia darran-kelinske-fivestars divyanshu013 fhenry-tyemill geisterfurz007 lukewalczak therealemjy tmaly1980


text:
Design a better MediaBrowser handler

Currently, the MediaBrowser only shows the queue of the player, triggering skip events when a user clicks on a track.
The idea is to make it work with custom content, such as playlists.

Not going to happen at the moment. In the new version (1.0.0) the service is now based on a headless task, as it can't extend two types of service at the same time, I'll be closing this as "wontfix" for now.
The only way to make it work is copying all the code from the RN's headless task service to our own, which may cause issues if React Native changes its internal JS engine code.


text:
java.lang.OutOfMemoryError on showing the map

Summary
We are using MapView to render the map, and getting error: Fatal Exception: java.lang.OutOfMemoryError: Failed to allocate a 40 byte allocation with 2534984 free bytes and 2475KB until OOM
Full Error:
Fatal Exception: java.lang.OutOfMemoryError: Failed to allocate a 40 byte allocation with 2534984 free bytes and 2475KB until OOM, target footprint 268435456, growth limit 268435456; giving up on allocation because <1% of heap free after GC.
at sun.misc.Cleaner.create(Cleaner.java:132)
at libcore.util.NativeAllocationRegistry.registerNativeAllocation(NativeAllocationRegistry.java:262)
at android.graphics.Bitmap.(Bitmap.java:160)
at android.graphics.Bitmap.nativeCreateFromParcel(Bitmap.java)
at android.graphics.Bitmap.-$$Nest$smnativeCreateFromParcel()
at android.graphics.Bitmap$1.createFromParcel(Bitmap.java:2110)
at android.graphics.Bitmap$1.createFromParcel(Bitmap.java:2102)
at azu.a(:com.google.android.gms.policy_maps_core_dynamite@224312102@224312102065.485900589.485900589:2)
at com.google.android.gms.maps.model.internal.a.bo(:com.google.android.gms.policy_maps_core_dynamite@224312102@224312102065.485900589.485900589:8)
at azt.onTransact(:com.google.android.gms.policy_maps_core_dynamite@224312102@224312102065.485900589.485900589:4)
at android.os.Binder.transact(Binder.java:1164)
at com.google.android.gms.internal.maps.zza.zzH(com.google.android.gms:play-services-maps@@18.0.0:2)
at com.google.android.gms.internal.maps.zzg.zzg(com.google.android.gms:play-services-maps@@18.0.0:3)
at com.google.android.gms.maps.model.BitmapDescriptorFactory.fromBitmap(com.google.android.gms:play-services-maps@@18.0.0:2)
at com.airbnb.android.react.maps.AirMapMarker.getIcon(AirMapMarker.java:458)
at com.airbnb.android.react.maps.AirMapMarker.updateMarkerIcon(AirMapMarker.java:291)
at com.airbnb.android.react.maps.AirMapMarker.updateCustomForTracking(AirMapMarker.java:283)
at com.airbnb.android.react.maps.ViewChangesTracker.update(ViewChangesTracker.java:63)
at com.airbnb.android.react.maps.ViewChangesTracker$1.run(ViewChangesTracker.java:23)
at android.os.Handler.handleCallback(Handler.java:942)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loopOnce(Looper.java:201)
at android.os.Looper.loop(Looper.java:288)
at android.app.ActivityThread.main(ActivityThread.java:7898)
at java.lang.reflect.Method.invoke(Method.java)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:548)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:936)
Reproducible sample code
<MapView style={{ height: "100%", width: "100%", display: (listView) ? "none" : "flex", zIndex: -1 }}

                        region={region}
                        showsMyLocationButton={true}
                        moveOnMarkerPress={false}

                        onPress={storeLocation}
                        onDoublePress={(e) => onMapPress(e)}
                        onPoiClick={(e) => onMapPress(e)}
                        onMarkerPress={() => storeLocation()}
                        onMarkerSelect={() => storeLocation()}
                    >

                        <Marker coordinate={coordinate}
                            // draggable
                            onPress={storeLocation}
                            onDragEnd={onMapPress}
                            style={{

                            }}
                        // title = {userLocality + `, ` + userState}

                        >
                            {/* <PriceMarker amount={20} /> */}
                            <MarkerView></MarkerView>
                        </Marker>
                    </MapView>

Steps to reproduce
The error is sporadic
Expected result
The map should render without crashing the app
Actual result
App is crashing
React Native Maps Version
1.3.2
What platforms are you seeing the problem on?
Android
React Native Version
0.69.5
What version of Expo are you using?
Not using Expo
Device(s)
Samsung Galaxy S10(Android 10), Pixel 6(Android 13)
Additional information
No response

Device
Brand: OnePlus
Model: OnePlus Nord
Orientation: Portrait
RAM free: 4.45 GB
Disk free: 27.55 GB
Operating System
Version: Android 12
Orientation: Portrait
Rooted:No
Fatal Exception: java.lang.OutOfMemoryError: Failed to allocate a 168 byte allocation with 2530704 free bytes and 2471KB until OOM, target footprint 402653184, growth limit 402653184; giving up on allocation because <1% of heap free after GC.
       at ebr.a(ebr.java)
       at ebt.g(ebt.java:37)
       at ebt.<init>(ebt.java)
       at ebu.a(ebu.java:1)
       at ebv.j(ebv.java:10)
       at ebv.i(ebv.java)
       at dhx.<init>(dhx.java:1)
       at dmx.a(dmx.java:2)
       at com.google.maps.api.android.lib6.phoenix.an.B(an.java:23)
       at com.google.maps.api.android.lib6.phoenix.an.o(an.java:1)
       at com.google.maps.api.android.lib6.phoenix.an.i(an.java:19)
       at com.google.maps.api.android.lib6.impl.dw.b(dw.java:2)
       at com.google.maps.api.android.lib6.impl.du.Q(du.java)
       at com.google.maps.api.android.lib6.impl.du.t(du.java:5)
       at com.google.android.gms.maps.model.internal.s.bo(s.java:31)
       at azt.onTransact(azt.java:4)
       at android.os.Binder.transact(Binder.java:1084)
       at com.google.android.gms.internal.maps.zza.zzc(zza.java:7)
       at com.google.android.gms.internal.maps.zzv.zzs(zzv.java:9)
       at com.google.android.gms.maps.model.Marker.setIcon(Marker.java:15)
       at com.airbnb.android.react.maps.AirMapMarker.updateMarkerIcon(AirMapMarker.java:9)
       at com.airbnb.android.react.maps.AirMapMarker.updateCustomForTracking(AirMapMarker.java:6)
       at com.airbnb.android.react.maps.ViewChangesTracker.update(ViewChangesTracker.java:18)
       at com.airbnb.android.react.maps.ViewChangesTracker$1.run(ViewChangesTracker.java:8)
       at android.os.Handler.handleCallback(Handler.java:938)
       at android.os.Handler.dispatchMessage(Handler.java:99)
       at android.os.Looper.loopOnce(Looper.java:233)
       at android.os.Looper.loop(Looper.java:344)
       at android.app.ActivityThread.main(ActivityThread.java:8212)
       at java.lang.reflect.Method.invoke(Method.java)
       at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:584)
       at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1034)

Still relevant

Still a problem with latest version 1.11.3.
Problem occurs on android version lower then compileSdkVersion.
On this version LATEST is default and there is no way to put it to LEGACY in RN code.
Workaround is to edit file: node_modules/react-native-maps/android/src/main/java/com/rnmaps/maps/MapModule.java
line 370:
MapsInitializer.Renderer.LATEST => MapsInitializer.Renderer.LEGACY
and then enable "latest renderer" in code with
 enableLatestRenderer().then(e => console.log(e));
//console.log just to show which one is selected, remove it

Still relevant，Is there any solution?

Still relevant ++

Still relevant ++

Still relevant ++

Still relevant

still relevant

still relevant

repo: react-native-maps/react-native-maps


text:
fix(android): return netmask of first IPv4 address

fixes #633

:tada: This PR is included in version 9.3.6 :tada:
The release is available on:

npm package (@latest dist-tag)
GitHub release

Your semantic-release bot :package::rocket:

authors: C-Otto matt-oakes


text:
[PushNotification] RCTPushNotificationManager.h not found

Bug
I followed everything here (https://github.com/react-native-community/react-native-push-notification-ios ) to use PushNotification on iOS, but when I try to build the app, I get the following error.
RCTPushNotificationManager.h file not found
I even added RCTPushNotification.xcodeproj to Libraries but it still get the same error.

With this package, you're supposed to use #import <RNCPushNotificationIOS.h> and RNCPushNotificationIOS instead of RCTPushNotificationManager.h and RCTPushNotificationManager

Hi @eramudeep, did you solved this? I'm facing the same issue, I use
#import <RNCPushNotificationIOS.h>
and I get the same error, RNCPushNotificationIOS.h file not found
I followed this step:
Add the following to your Project: node_modules/@react-native-community/push-notification-ios/ios/PushNotificationIOS.xcodeproj
Add the following to Link Binary With Libraries: libRNCPushNotificationIOS.a

Hi,I am also facing same issue please guide here.

Well, following are detailed steps to migrate from @react-native-community/push-notification-ios

npm i @react-native-community/push-notification-ios --save

Sometime if you have older version of above lib, just remove node-module folder (rm -rf node_modules/) and re-run npm i on project root directory

manually link react-native link @react-native-community/push-notification-ios (not need for react native version > 60 but I had to do it as it didn't work for me even if I had version 62).

Make sure in iOS/pod file has following updates:
remove line:
pod 'React-RCTPushNotification', :path => '../node_modules/react-native/Libraries/PushNotificationIOS'
New link is there:
pod 'RNCPushNotificationIOS', :path => '../node_modules/@react-native-community/push-notification-ios'

Good to run to clean up the pod cache under iOS dir as:
rm -rf Pods -- In iOS Folder

in iOS dir, run pod install

In AppDelegate.m file in you iOS folder perform following:

Replace #import <React/RCTPushNotificationManager.h>
with #import <RNCPushNotificationIOS.h>
also find and replace RCTPushNotificationManager with RNCPushNotificationIOS

Build project using react native command react-native run-is or npm run ios. In case build fails, run the project with Xcode with clean build option.

Edit your Xcode build option to enable to ask (Product-->Scheme-->Edit Scheme) so that App can run on real iOS device.

Make sure you run your app on Android to verify that build is not broken.
./gradlew clean
npm run android or react-native run-android

Also make sure that on your react-native app where ever you are performing any action related to iOS you check Platform as shown below:
if (Platform.OS === 'ios') {
notification.finish(PushNotificationIOS.FetchResult.NoData);
}

Any update on this issue, i'm also facing the same issue.

For me, it worked. what i did is 1. Changed #import <RNCPushNotificationIOS.h>
and
RNCPushNotificationIOS
instead of RCTPushNotificationManager.h and RCTPushNotificationManager 2. I added Header search path to $(SRCROOT)/../node_modules/@react-native-community/push-notification-ios/ios to non-recursive.. Then clean the project and build it again it worked.

Neither automatic nor manual linking worked for me (RN 0.62), I had to add
pod 'RNCPushNotificationIOS', :path => '../node_modules/@react-native-community/push-notification-ios'

to my Podfile myself. Then it worked.

@dolsem

cd ios/
pod 'RNCPushNotificationIOS', :path => '../node_modules/@react-native-community/push-notification-ios'

zsh: is a directory: ../node_modules/@react-native-community/push-notification-ios

I've fixed this by manually adding the following header search path.
"${SRCROOT}/../node_modules/@react-native-community/push-notification-ios/ios"

Just Import to AppDelegate.h file instead of AppDelegate.m file

repo: react-native-push-notification/ios


text:
Pressable component missing focused argument

The latest release has removed  focused argument from the children rendering function children({pressed, focused}) This has resulted in breaking changes
New code
    <View
      {...restPropsWithDefaults}
      {...eventHandlers}
      ref={viewRef}
      isTVSelectable={isTVSelectable !== false && accessible !== false}
      style={typeof style === 'function' ? style({pressed}) : style}
      collapsable={false}>
      {typeof children === 'function' ? children({pressed}) : children}
      {__DEV__ ? <PressabilityDebugView color="red" hitSlop={hitSlop} /> : null}
    </View>
  );

Old Code
    <View
      {...restProps}
      {...eventHandlers}
      {...android_rippleConfig?.viewProps}
      accessible={accessible !== false}
      focusable={focusable !== false}
      isTVSelectable={isTVSelectable !== false && accessible !== false}
      hitSlop={hitSlop}
      ref={viewRef}
      style={typeof style === 'function' ? style({pressed, focused}) : style}>
      {typeof children === 'function' ? children({pressed, focused}) : children}
      {__DEV__ ? <PressabilityDebugView color="red" hitSlop={hitSlop} /> : null}
    </View>
  );

React Native version:
Run react-native info in your terminal and copy the results here.
System:
OS: macOS 11.5.1
CPU: (12) x64 Intel(R) Core(TM) i7-9750H CPU @ 2.60GHz
Memory: 18.43 MB / 16.00 GB
Shell: 3.2.57 - /bin/bash
Binaries:
Node: 12.13.1 - /var/folders/dm/zvvyvl9j6835rtc6f676rk3xplzggv/T/yarn--1628248979426-0.764699714281925/node
Yarn: 1.22.10 - /var/folders/dm/zvvyvl9j6835rtc6f676rk3xplzggv/T/yarn--1628248979426-0.764699714281925/yarn
npm: 7.6.0 - /usr/local/bin/npm
Watchman: 4.9.0 - /usr/local/bin/watchman
Managers:
CocoaPods: 1.10.2 - /usr/local/bin/pod
SDKs:
iOS SDK:
Platforms: iOS 14.5, DriverKit 20.4, macOS 11.3, tvOS 14.5, watchOS 7.4
Android SDK:
API Levels: 22, 23, 25, 26, 27, 28, 29
Build Tools: 19.1.0, 20.0.0, 25.0.0, 27.0.3, 28.0.3, 29.0.2, 29.0.3
System Images: android-22 | Android TV Intel x86 Atom, android-24 | Intel x86 Atom_64, android-24 | Google APIs Intel x86 Atom_64, android-28 | Android TV Intel x86 Atom, android-28 | Google APIs Intel x86 Atom_64, android-28 | Google Play Intel x86 Atom, android-29 | Intel x86 Atom_64, android-29 | Google APIs Intel x86 Atom, android-29 | Google Play Intel x86 Atom, android-Q | Android TV Intel x86 Atom
Android NDK: 19.2.5345600
IDEs:
Android Studio: 2020.3 AI-203.7717.56.2031.7583922
Xcode: 12.5.1/12E507 - /usr/bin/xcodebuild
Languages:
Java: 1.8.0_212 - /Library/Java/JavaVirtualMachines/jdk1.8.0_212.jdk/Contents/Home/bin/javac
npmPackages:
@react-native-community/cli: Not Found
react: ^17.0.2 => 17.0.2
react-native: Not Found
react-native-macos: Not Found
npmGlobalPackages:
react-native: Not Found

@prakashjais99 thanks for the bug report. It looks like this will mainly impact Android TV, but could also cause an accessibility issue on Apple TV.  I'll see if I can figure out which commit caused the regression and implement a fix.

Found the issue -- Pressable support was not merged correctly to the 0.64 branch.  Will fix the merge and get a release out shortly.

@prakashjais99 I have fixed the issue and testing looks good on both Android TV and Apple TV.  Will close this once I get a new release out.

@douglowder thanks for the quick fix.

Fix is in release 0.64.2-2.  Closing.

repo: react-native-tvos/react-native-tvos


text:
How a video/audio length is determined?

I am able to play some audio/video files where the player would give me the full duration of the media. But for some other media files. It would return the duration as a negative number.
I am sort of new to media file spec world.
So my question is how the duration is determined. Is it like through metadata inside the media file or something else?
Thanks for your answer(s).

It's completely determined by the underlying native player framework. If you can provide a few samples of ones that don't report the duration properly, I can see if it's possible to workaround the duration not being detected.

@cobarx of course here they are.
Here the links for those audio files. (I could not upload them in the comments)
Thanks
https://drive.google.com/uc?export=download&id=1AjPwylDJgR8DOnmJWeRgZzjsohi-7ekj
https://drive.google.com/uc?export=download&id=1VM9_umeyzJn0v1pRzR1BSm9y3IhZ3c0E
https://drive.google.com/uc?export=download&id=1bmvPOy2IVbkUROgm0dqiZry_miiL4OqI

https://drive.google.com/uc?export=download&id=1V-c_WmanMA9i5BwfkmTs-605BQDsfyzC

Hi @efleurine I'm filling getting a chance to look at this. Which platform are you having these duration issues on?

Hi @cobarx
I'm getting wrong duration. Can you help me?
On iOS: duration: 9841.2666015625
But on android: duration: 9818.682
9841 is the right duration.
I'm using version 4.2.0

I have the same issue, for me sometimes it return duration with this negative number -9223372036854776. There are a lot of opened issues related to the same topic

seems that I have a similar problem... checking the event.nativeEvent playableDuration property is not equal as song duration and this is driving me a bit crazy as the method onEnd is not firing correctly at the end of the song...
Any suggestions/ideas? Should be possible to rewrite that event.nativeEvent playableDuration property? I know already the length of each song that is coming from my list...

repo: react-native-video/react-native-video


text:
RTSP Support

I've seen there's a pull request for this subject, tried to apply the required changes manually but didn't have success, when will RTSP streams supported?

Support for RTSP is possible only for android and it's on roadmap #3351


text:
changed file extension from .tsx to .ts for types file

.tsx files should only be used for react components containing jsx, while .ts files should be for functions, types etc.
in this case, the types file will only contain types for the navigation.

.tsx and .ts files have some differences in the supported syntax (e.g. the legacy type assertion syntax works in .ts files). We use .tsx for everything to avoid any syntactic ambiguity and for simplicity so we don't need to think about what extension to use for each file.
Most people use .tsx for React components only, but there's no specific reason that it should only be used for React components.


text:
getRoutes dev Argument is Undefined

Reference:
getRoutes: async ({ dev }) => {
  console.log(dev);
}

When getRoutes is called during a build, the dev argument is always undefined.
Environment
npx: installed 1 in 1.412s

  System:
    OS: macOS 10.14.4
    CPU: (8) x64 Intel(R) Core(TM) i7-7820HQ CPU @ 2.90GHz
    Memory: 864.67 MB / 16.00 GB
    Shell: 3.2.57 - /bin/bash
  Binaries:
    Node: 12.3.1 - /usr/local/bin/node
    Yarn: 1.16.0 - /usr/local/bin/yarn
    npm: 6.9.0 - /usr/local/bin/npm
  Browsers:
    Chrome: 74.0.3729.169
    Safari: 12.1
  npmPackages:
    react: ^16.8.6 => 16.8.6
    react-dom: ^16.8.6 => 16.8.6
    react-hot-loader: ^4.8.8 => 4.8.8
    react-static: ^7.0.10 => 7.0.10
    react-static-plugin-reach-router: ^7.0.10 => 7.0.10
    react-static-plugin-sass: ^7.0.10 => 7.0.10
    react-static-plugin-sitemap: ^7.0.10 => 7.0.10
  npmGlobalPackages:
    react-static: 6.3.3

Expected Behavior
dev should be a true or false.

This is the same with getSiteData too. I see that there is a property stage that is set to dev when running locally. Can we reliably use dev = stage === "dev" in place of the missing dev property?

I actually don't know the answer to this. When that code was written, we were not around yet. In the new RS 8, these variables no longer exist. The issue is that the values passed to this function are not "created" in a single entry point, but are an accumulation of function calls.
If you're trying to figure out if you are in "yarn start" instead of "yarn build" etc, you're probably better off checking the REACT_STATIC_ENV variable or passing your own variable, as that will always be consistent :)

The config examples in the docs still show a dev property.
https://github.com/react-static/react-static/blob/master/docs/config.md#getroutes

Yes, those docs are not perfectly up to date. There are multiple issues regarding that, but it's on track of being fixed in the next major :)

authors: JoshClose SleeplessByte kalinchuk

repo: react-static/react-static


text:
Fix dropdown entry selection issue

Currently a user have to click twice on an entry within the dropdown
list to close it. This happens because the li click event will call
'handleSelect' and the default behavior calls 'handleDocumentClick'.
This is wrong when the user clicks on an entry (and not outside of
the dropdown) so now the 'handleSelect' prevents the default behaviour.

Can you tell me the steps to reproduce that problem? I'm trying the dropdown in the playground and I'm not able to reproduce it :(

Can you try it with the dev branch? On the website it works/worked fine but when you build the docs on your machine with latest dev (currently broken on my machine) you maybe can reproduce it :)

+1 it seems there's no such problem

I've had the same problem for quite some time now. I'm using react-toolbox with Preact and I assumed it was an incompatibility with that lib (see #1617 as well). I now assume the problem lies somewhere else, but putting e.preventDefault in my onChange handler did the trick.

authors: louisremi rndevfx rubenmoya vitalif

repo: react-toolbox/react-toolbox


text:
Add Docker for containerization

Description
Add docker for containerization, to enable the continued development of the reactdevske-website, regardless of dependencies and dev dependencies package updates, and also enable easier collaboration with other contributors
Solution description
No response
Additional information
No response

Request to be assigned to Open Issue #113
Walobwa Dan.

@WalobwaD please, assign me this

Hello @EspiraMarvin
This is a wonderful suggestion. We will be picking this up during the next phase of implementation.
Feel free to tune into our weekly standup chats (Here is an upcoming one you can attend) to know when this will be happening
cc @WalobwaD you are also welcome to attend.

Great!

Hello @EspiraMarvin && @WalobwaD
Checkout Pull #127 and feel free to add/suggest on additional things you would want on the dockerfile and the docker-compose.yml file

@orama254  seems pretty okay, maybe to add on,  he can add a volume definition

authors: EspiraMarvin WalobwaD orama254

repo: reactdeveloperske/reactdevske-website


text:
Use avatar for IRC user

Hello,
When user is only on IRC and not at all on discord they don't have avatar.
Maybe we should use "http://avatars.adorable.io/" for this case ?

All users on the IRC side that aren't in Discord are automatically assigned the webhook avatar.

It can be customized

Yes, that's what I'm telling you.

And the ability to use other service with configuration (https://robohash.org)

Last line of getDiscordAvatar :
return "https://robohash.org/" + nick + "?set=set4"
instead of :
return null;

If anyone wants to give this a go: slack-irc—which this is based on—does exactly this, through a configurable avatarURL parameter. It defaults to Adorable Avatars, but RoboHash would probably be a good choice too 👍

authors: Kovaelin ekmartin syrm

repo: reactiflux/discord-irc


text:
imagePullSecrets not used in backup cronjob templates

If imagePullSecrets are used to pull main database images, they are not used for backup templates. So if the backup job is scheduled on a pod without database image, it fails pulling the image.
Manually adding imagePullSecrets to CronJob definition works but this is a dirty workaround :)

Thank you for reporting this issue when imagePullSecrets are used to pull main database images.
Could you please share a YAML example where your configuration does not work?

thank you for your quick reply.. here is some more info :
Launching this yaml file on a cluster (at scaleway.com => scw-xxx) with 1 node is fine
apiVersion: v1
data:
  .dockerconfigjson: REDACTED
kind: Secret
metadata:
  name: registry-secret
  namespace: kubegres-sandbox
type: kubernetes.io/dockerconfigjson
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
  name: kubegres-backup-issue-78-pvc
  namespace: kubegres-sandbox
spec:
  storageClassName: scw-bssd
  accessModes:
    - ReadWriteOnce
  resources:
    requests:
      storage: 1Gi
---
apiVersion: kubegres.reactive-tech.io/v1
kind: Kubegres
metadata:
  name: kubegres-issue-78
  namespace: kubegres-sandbox
spec:
  replicas: 1
  image: my-private-registry/image:tag
  imagePullSecrets:
    - name: registry-secret
  database:
    size: 1Gi
    storageClassName: scw-bssd
  failover:
    isDisabled: true
  backup:
    schedule: "*/3 * * * *"
    pvcName: kubegres-backup-issue-78-pvc
    volumeMount: /var/lib/backup
  env:
    - name: POSTGRES_PASSWORD
      value: supassword
    - name: POSTGRES_REPLICATION_PASSWORD
      value: reppassword

Backup CronJob is created :
kind: CronJob
apiVersion: batch/v1beta1
metadata:
  name: backup-kubegres-issue-78
  namespace: kubegres-sandbox
  uid: 499fa9f5-5a59-48d9-8fa2-7b08c74ca34b
  resourceVersion: '1469331142'
  generation: 1
  creationTimestamp: '2021-12-27T14:02:36Z'
  ownerReferences:
    - apiVersion: kubegres.reactive-tech.io/v1
      kind: Kubegres
      name: kubegres-issue-78
      uid: db3cb326-bc37-434e-b3ba-44175b083eb6
      controller: true
      blockOwnerDeletion: true
spec:
  schedule: '*/3 * * * *'
  concurrencyPolicy: Forbid
  suspend: false
  jobTemplate:
    metadata:
      creationTimestamp: null
    spec:
      template:
        metadata:
          creationTimestamp: null
        spec:
          volumes:
            - name: backup-volume
              persistentVolumeClaim:
                claimName: kubegres-backup-issue-78-pvc
            - name: postgres-config
              configMap:
                name: base-kubegres-config
                defaultMode: 511
          containers:
            - name: backup-postgres
              image: my-private-registry/image:tag
              args:
                - sh
                - '-c'
                - /tmp/backup_database.sh
              env:
                - name: PGPASSWORD
                - name: KUBEGRES_RESOURCE_NAME
                  value: kubegres-issue-78
                - name: BACKUP_DESTINATION_FOLDER
                  value: /var/lib/backup
                - name: BACKUP_SOURCE_DB_HOST_NAME
                  value: kubegres-issue-78
                - name: POSTGRES_PASSWORD
                  value: supassword
                - name: POSTGRES_REPLICATION_PASSWORD
                  value: reppassword
              resources: {}
              volumeMounts:
                - name: backup-volume
                  mountPath: /var/lib/backup
                - name: postgres-config
                  mountPath: /tmp/backup_database.sh
                  subPath: backup_database.sh
              terminationMessagePath: /dev/termination-log
              terminationMessagePolicy: File
              imagePullPolicy: IfNotPresent
          restartPolicy: OnFailure
          terminationGracePeriodSeconds: 30
          dnsPolicy: ClusterFirst
          securityContext: {}
          schedulerName: default-scheduler
  successfulJobsHistoryLimit: 3
  failedJobsHistoryLimit: 1
status:
  lastScheduleTime: '2021-12-27T14:06:00Z'
  lastSuccessfulTime: '2021-12-27T14:06:05Z'

the imagePullSecrets is missing there..
on my single node cluster, jobs are OK, because my private image is already present (imagePullPolicy: IfNotPresent)
backup-kubegres-issue-78-27343563   1/1           17s        7m46s
backup-kubegres-issue-78-27343566   1/1           5s         4m46s

But if i add some nodes to the cluster
NAME                                             STATUS   ROLES    AGE     VERSION
scw-k8s-solidev-default-34b29ff7154b4452a4ace2   Ready    <none>   20d     v1.23.0
scw-k8s-solidev-default-817558573a0244e09202dc   Ready    <none>   6m49s   v1.23.0
scw-k8s-solidev-default-ee42e6727e114831aeaac8   Ready    <none>   6m24s   v1.23.0

the backup job fails depending of which node it is scheduled :
✦ ➜ kubectl get jobs
NAME                                COMPLETIONS   DURATION   AGE
backup-kubegres-issue-78-27343563   1/1           17s        9m57s
backup-kubegres-issue-78-27343566   1/1           5s         6m57s
backup-kubegres-issue-78-27343569   0/1           3m57s      3m57s

✦ ➜ kubectl describe jobs/backup-kubegres-issue-78-27343569
Name:             backup-kubegres-issue-78-27343569
Namespace:        kubegres-sandbox
(...)
Events:
  Type    Reason            Age    From            Message
  ----    ------            ----   ----            -------
  Normal  SuccessfulCreate  5m33s  job-controller  Created pod: backup-kubegres-issue-78-27343569-hb2d6

✦ ➜ kubectl describe pods/backup-kubegres-issue-78-27343569-hb2d6
Name:         backup-kubegres-issue-78-27343569-hb2d6
Namespace:    kubegres-sandbox
Priority:     0
Node:         scw-k8s-solidev-default-817558573a0244e09202dc/10.197.230.31
Start Time:   Mon, 27 Dec 2021 15:09:00 +0100
(...)
Events:
  Type     Reason                  Age                   From                     Message
  ----     ------                  ----                  ----                     -------
  Normal   Scheduled               6m12s                 default-scheduler        Successfully assigned kubegres-sandbox/backup-kubegres-issue-78-27343569-hb2d6 to scw-k8s-solidev-default-817558573a0244e09202dc
  Normal   SuccessfulAttachVolume  6m11s                 attachdetach-controller  AttachVolume.Attach succeeded for volume "pvc-cef4f654-d552-4a9d-b7c5-1accd1757530"
  Normal   Pulling                 4m46s (x4 over 6m8s)  kubelet                  Pulling image "my-private-registry/image:tag"
  Warning  Failed                  4m46s (x4 over 6m8s)  kubelet                  Failed to pull image "my-private-registry/image:tag": rpc error: code = Unknown desc = failed to pull and unpack image "my-private-registry/image:tag": failed to resolve reference "my-private-registry/image:tag": failed to authorize: failed to fetch anonymous token: unexpected status: 403 Forbidden
  Warning  Failed                  4m46s (x4 over 6m8s)  kubelet                  Error: ErrImagePull
  Warning  Failed                  4m18s (x6 over 6m7s)  kubelet                  Error: ImagePullBackOff
  Normal   BackOff                 58s (x20 over 6m7s)   kubelet                  Back-off pulling image "my-private-registry/image:tag"

the private image have not been pulled on new nodes, so when the backup is scheduled on one of these new nodes, as the imagePullSecrets field is missing in CronJob spec, the container cannot be pulled.

Thank you for those details which will help me with the investigation.

Hi @alex-arica sent a PR #103 to fix this issue.

authors: alex-arica jmbarbier urbany

repo: reactive-tech/kubegres