V2ServerAPICalls: JFrog quirk flag should enable for Artifactory domains without "jfrog" in the domain

Prerequisites

[X] Write a descriptive title.
[X] Make sure you are able to repro it on the latest released version
[X] Search the existing issues.

Steps to reproduce
(Related to #1485 and #1526 - spinning off a separate issue at the request of @alerickson in https://github.com/PowerShell/PSResourceGet/issues/1485#issuecomment-1897197544)

Purchase and install Artifactory on-premises, with a self-descriptive domain name (like artifactory).
Wait some time for JFrog to rearchitect Artifactory to "JFrog Platform" with component services like Artifactory, XRay, etc. (/s)
Register Artifactory/JFrog repository with PSResourceGet

Our Artifactory/JFrog instances all have local DNS name artifactory (plus some environment-specific DNS suffixes that are NDAed). In any case, we'd expect the Artifactory NuGet URLs to look something like https://artifactory.f.q.d.n/artifactory/api/nuget/v2/<feed-name>/ (replacing f.q.d.n) with the DNS suffix
Expected behavior
Microsoft.PowerShell.PSResourceGet.Cmdlets.V2ServerAPICalls._isJFrogRepo is true when PSResourceGet makes calls to Artifactory endpoints

Actual behavior
Microsoft.PowerShell.PSResourceGet.Cmdlets.V2ServerAPICalls._isJFrogRepo is false

Error details
N/A

Environment data
ModuleType Version    Name                                ExportedCommands
---------- -------    ----                                ----------------
Binary     1.0.1      Microsoft.PowerShell.PSResourceGet  {Find-PSResource, Get-InstalledPSResource, Get-PSResourceR...

Key   : PSVersion
Value : 5.1.19041.3803
Name  : PSVersion

Key   : PSEdition
Value : Desktop
Name  : PSEdition

Key   : PSCompatibleVersions
Value : {1.0, 2.0, 3.0, 4.0...}
Name  : PSCompatibleVersions

Key   : BuildVersion
Value : 10.0.19041.3803
Name  : BuildVersion

Key   : CLRVersion
Value : 4.0.30319.42000
Name  : CLRVersion

Key   : WSManStackVersion
Value : 3.0
Name  : WSManStackVersion

Key   : PSRemotingProtocolVersion
Value : 2.3
Name  : PSRemotingProtocolVersion

Key   : SerializationVersion
Value : <IP_ADDRESS>
Name  : SerializationVersion

Visuals
N/A

Depending on the requirements of this specific class, it may be worth replacing hostname-/URL-based detection with an HTTP request to the root feed URL. (This call does not need to be authenticated.)
Artifactory's response (be it 401, 403, or 5xx) will include one of the following HTTP headers in the response:

X-Artifactory-Id
X-Artifactory-Node-Id
X-Jfrog-Version

I didn't couldn't find X-Artifactory-Id, X-Artifactory-Node-Id, or X-Jfrog-Version in the HTTP Headers (using my test account), but did find <title>JFrog</title> in the response content.
@sean-r-williams do you happen to see <title>JFrog</title>  in the content of your response as well?

@sean-r-williams do you happen to see <title>JFrog</title> in the content of your response as well?

@alerickson I don't, no. To clarify, I'm talking about a request to the root URL of the feed (i.e. the one users provide when registering the repository) - that is, something like https://artifactory.f.q.d.n/artifactory/api/nuget/psgallery-nuget-local. I don't see the aforementioned X-* headers when hitting the domain root (https://artifactory.f.q.d.n), even though it is a selfhosted JFrog Platform/Artifactory instance.
I do see <title>JFrog</title> when GETting the domain root, but I would caution against using that for any heuristics. If Artifactory were hosted behind a reverse-proxy (or similar) under a specific VPath, the domain-root might "point to" a service other than JFrog and that detection would break.
For the sake of completeness, the response content when GETing https://artifactory.f.q.d.n/artifactory/api/nuget/psgallery-nuget-local (the root URL of the feed) looks like this:

Authenticated:<?xml version="1.0" encoding="utf-8"?>
<!--
 ~
 ~ Copyright 2016 JFrog Ltd. All rights reserved.
 ~ JFROG PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
 -->

<service xmlns="http://www.w3.org/2007/app" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:app="http://www.w3.org/2007/app" xml:base="https://artifactory.f.q.d.n/artifactory/api/nuget/psgallery-nuget-local">
   <workspace>
       <atom:title>Default</atom:title>
       <collection href="Packages">
           <atom:title>Packages</atom:title>
       </collection>
   </workspace>
</service>

Unauthenticated:{
  "errors": [
    {
      "status": 401,
      "message": "Unauthorized"
    }
  ]
}

In both cases, headers look something like this (plus WWW-Authenticate: Basic realm="Artifactory Realm" for the 401):
X-JFrog-Version: Artifactory/7.59.12 75912900
X-Artifactory-Id:<PHONE_NUMBER>abcdef0123456789abcdef01234567
X-Artifactory-Node-Id: artifactory02
Transfer-Encoding: chunked
Date: Tue, 23 Jan 2024 06:35:13 GMT
Content-Type: application/json


Updated security vulnerability

If the package-lock.json file is now supposed to contain internal server names, perhaps we should remove the file altogether?

@Ladicek  That makes sense. I'm not used in nodejs conventions, but I don't even know, why we have package-lock in the repo at all.

@akoniar do you have an opinion on ^^^?


Added LogCustomFields to xWebSite (Fixes #267)

Modified xWebSite to include the ability to manage logging custom fields. (Fixes #267 )
Below is an example of how to add a logging custom field with the updated resource:
xWebsite NewWebsite
{
    Ensure             = 'Present'
    Name               = 'Default Web Site'
    LogCustomFields    = MSFT_xLogCustomFieldInformation
    {
        LogFieldName   = 'Original-IP'
        SourceName     = 'X-Forwarded-For'
        SourceType     = 'RequestHeader'
    }
}

This change is

Awesoem work on this one! :smile: Just a few review comments.

Reviewed 4 of 7 files at r1, 1 of 2 files at r2, 3 of 3 files at r3.
Review status: all files reviewed at latest revision, all discussions resolved, some commit checks failed.

README.md, line 170 at r3 (raw file):

informationin

information

DSCResources/MSFT_xWebsite/MSFT_xWebsite.psm1, line 770 at r3 (raw file):

            }

            # Update LogCustomFields if neeed

Instead of duplicating this code twice, can't we just run this once after the evaluation if the website should be created or already exists?

DSCResources/MSFT_xWebsite/MSFT_xWebsite.psm1, line 1090 at r3 (raw file):

neeed

We should have two 'e' here :) Throughout.

DSCResources/MSFT_xWebsite/MSFT_xWebsite.psm1, line 1634 at r3 (raw file):

{
    [CmdletBinding()]
    [OutputType([Microsoft.Management.Infrastructure.CimInstance])]

Should return an array of CimInstance's not just one?

DSCResources/MSFT_xWebsite/MSFT_xWebsite.psm1, line 1860 at r3 (raw file):

    Set-WebConfigurationProperty -PSPath 'MACHINE/WEBROOT/APPHOST' -Filter "system.applicationHost/sites/site[@name='$Site']/logFile/customFields" -Name "." -Value $setCustomFields

    # The second Set-WebConfigurationProperty is to handle an edge case where logfile.customFields is not updated correctly.  May be caused by a possible bug in the IIS provider

Could we instead loop twice over one of the Set-WebConfigurationProperty?

DSCResources/MSFT_xWebsite/MSFT_xWebsite.psm1, line 1860 at r3 (raw file):

    Set-WebConfigurationProperty -PSPath 'MACHINE/WEBROOT/APPHOST' -Filter "system.applicationHost/sites/site[@name='$Site']/logFile/customFields" -Name "." -Value $setCustomFields

    # The second Set-WebConfigurationProperty is to handle an edge case where logfile.customFields is not updated correctly.  May be caused by a possible bug in the IIS provider

Could you please submit an issue for this in this repo so this can be tracked. I will label it as external though, since we can't do anything about it in this repo. But once fixed we can remove the workaround.

DSCResources/MSFT_xWebsite/MSFT_xWebsite.psm1, line 2154 at r3 (raw file):

sourceName

Should we have upper 'S' on this property name? Same for the row below.

DSCResources/MSFT_xWebsite/MSFT_xWebsite.psm1, line 2156 at r3 (raw file):

            $sourceNameMatch = $customField.SourceName -eq $presentCustomField.sourceName
            $sourceTypeMatch = $customField.SourceType -eq $presentCustomField.sourceType
            if(-not ($sourceNameMatch -and $sourceTypeMatch))

Please add a space between if an the parenthesis .

DSCResources/MSFT_xWebsite/MSFT_xWebsite.schema.mof, line 54 at r3 (raw file):

    [Write, Description ("Use the localtime for file naming and rollover")] Boolean LoglocalTimeRollover;
    [Write, Description ("Format of the Logfiles. Only W3C supports LogFlags"), ValueMap{"IIS","W3C","NCSA"}, Values{"IIS","W3C","NCSA"}] String LogFormat;
    [Write, EmbeddedInstance("MSFT_xLogCustomFieldInformation"), Description("Custom logging field information")] String LogCustomFields[];

Could we extent this description a bit to something more like that first phrase in the README.md?

Tests/Integration/MSFT_xWebsite.config.ps1, line 157 at r3 (raw file):

                    LogFieldName = $Node.LogFieldName
                    SourceName   = $Node.SourceName
                    SourceType   = $Node.SourceType

Maybe we could add another SourceType for this test?

Tests/Unit/MSFT_xWebsite.Tests.ps1, line 84 at r3 (raw file):

$MockLogCustomFields

Could we start the variable names with lower-case? Throughout (only have to do  on your changes).
I know the others aren't, but we need to start somewhere to follow the guideline :smile:

Tests/Unit/MSFT_xWebsite.Tests.ps1, line 97 at r3 (raw file):

                truncateSize      = '1048576'
                localTimeRollover = 'False'
                customFields      = @{Collection = @($MockLogCustomFields)}

Since we can add an array maybe we should test with an array of two objects? Throughout.

Tests/Unit/MSFT_xWebsite.Tests.ps1, line 3529 at r3 (raw file):

            Context 'Expected behavior'{
                $Result = ConvertTo-CimLogCustomFields -InputObject $MockLogCustomFields

Maybe test this with an array?

Tests/Unit/MSFT_xWebsite.Tests.ps1, line 3569 at r3 (raw file):

               It 'should return True' {
                    Test-LogCustomField -Site $MockWebsiteName -LogCustomField $MockCimLogCustomFields | Should Be $True

Maybe test this with an array?

Tests/Unit/MSFT_xWebsite.Tests.ps1, line 3615 at r3 (raw file):

                It 'should not throw an error' {
                    { Set-LogCustomField  -Site $MockWebsiteName -LogCustomField $MockCimLogCustomFields } | Should Not Throw

Maybe test this with an array?

Comments from Reviewable

Reviewed 7 of 7 files at r4.
Review status: all files reviewed at latest revision, all discussions resolved, some commit checks failed.

Comments from Reviewable

@regedit32 Can you rebase this one to resolve the merge conflicts? Also, when you push next time the tests should pass, we got fixes merged for the failing tests.

Codecov Report

Merging #342 into dev will increase coverage by <1%.
The diff coverage is 100%.

@@         Coverage Diff          @@
##            dev   #342    +/-   ##
====================================
+ Coverage    89%    89%   +<1%
====================================
  Files        14     14
  Lines      2171   2210    +39
====================================
+ Hits       1944   1983    +39
  Misses      227    227

@johlju  done, thanks.

Review status: 5 of 8 files reviewed at latest revision, all discussions resolved.

Comments from Reviewable

Just a tiny review comment left, I must have missed it before.

Reviewed 3 of 3 files at r5.
Review status: all files reviewed at latest revision, all discussions resolved.

README.md, line 265 at r5 (raw file):

### Unreleased
* Updated **xWebSite** to include ability to manage custom logging fields

Can we remove this extra blank line?

Comments from Reviewable

done.  Did another rebase and it took care of that, thanks.

Review status: 7 of 8 files reviewed at latest revision, 1 unresolved discussion.

Comments from Reviewable

Review status: 7 of 8 files reviewed at latest revision, 1 unresolved discussion.

README.md, line 265 at r5 (raw file):
Previously, johlju (Johan Ljunggren) wrote…
Can we remove this extra blank line?

Done.

Comments from Reviewable

Reviewed 1 of 1 files at r6.
Review status: all files reviewed at latest revision, all discussions resolved.

Comments from Reviewable

@regedit32 Awesome work on this one! Thanks!


sidecar: add basic windows support

LGTM although Windows???

it occurred to me it would be useful if sidecars could run on platforms without tableflip support. as a bridge to apps running there


Anjay-freertos-client 21.10 showing error when build with STM32 CubeIDE

Hi Team,
Is Anjay-freertos-client 21.10 buildable?
We having error when we build it with STM32 cube IDE.
Please support us or share the buildable code.
We are using STM32CubeIde Version: 1.8.0.
Regards,
Vijendra

Hi!
Could you share the error message?

C:/Users/44137/Desktop/Anjay-freertos-client-21.10/Anjay-freertos-client-21.10/Projects/B-L462E-CELL1/app_compat/barometer_driver.c:17:10: fatal error: avsystem/commons/avs_log.h: No such file or directory
17 | #include <avsystem/commons/avs_log.h>
|          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
make: *** [app_compat/subdir.mk:37: app_compat/accelerometer_driver.o] Error 1
make: *** Waiting for unfinished jobs....
make: *** [app_compat/subdir.mk:39: app_compat/barometer_driver.o] Error 1
C:/Users/44137/Desktop/Anjay-freertos-client-21.10/Anjay-freertos-client-21.10/Projects/B-L462E-CELL1/app_compat/gyrometer_driver.c:17:10: fatal error: avsystem/commons/avs_log.h: No such file or directory
17 | #include <avsystem/commons/avs_log.h>
|          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
C:/Users/44137/Desktop/Anjay-freertos-client-21.10/Anjay-freertos-client-21.10/Projects/B-L462E-CELL1/app_compat/config_persistence.c:17:10: fatal error: avsystem/commons/avs_log.h: No such file or directory
17 | #include <avsystem/commons/avs_log.h>
|          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
make: *** [app_compat/subdir.mk:43: app_compat/gyrometer_driver.o] Error 1
C:/Users/44137/Desktop/Anjay-freertos-client-21.10/Anjay-freertos-client-21.10/Projects/B-L462E-CELL1/app_compat/magnetometer_driver.c:17:10: fatal error: avsystem/commons/avs_log.h: No such file or directory
17 | #include <avsystem/commons/avs_log.h>
|          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
make: *** [app_compat/subdir.mk:41: app_compat/config_persistence.o] Error 1
C:/Users/44137/Desktop/Anjay-freertos-client-21.10/Anjay-freertos-client-21.10/Projects/B-L462E-CELL1/app_compat/hygrometer_driver.c:17:10: fatal error: avsystem/commons/avs_log.h: No such file or directory
17 | #include <avsystem/commons/avs_log.h>
|          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
make: *** [app_compat/subdir.mk:47: app_compat/magnetometer_driver.o] Error 1
make: *** [app_compat/subdir.mk:45: app_compat/hygrometer_driver.o] Error 1
C:/Users/44137/Desktop/Anjay-freertos-client-21.10/Anjay-freertos-client-21.10/Projects/B-L462E-CELL1/app_compat/thermometer_driver.c:17:10: fatal error: avsystem/commons/avs_log.h: No such file or directory
17 | #include <avsystem/commons/avs_log.h>
|          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
make: *** [app_compat/subdir.mk:49: app_compat/thermometer_driver.o] Error 1
"make -j8 all" terminated with exit code 2. Build might be incomplete.
14:09:44 Build Failed. 15 errors, 0 warnings. (took 2s.532ms)
Regards,
Vijendra

Hi
Earlier I have downloaded the zip directly from the link and getting error in build.
Now I have git clone from
git clone --recursive https://github.com/AVSystem/Anjay-freertos-client
This code have been successfully build.
Now we are looking for port source code from stm32l462e to stm32f411ce.
As my device is on stmm32f411ce.
Please suggest what approach should I follow for this.
Thanks in advance.
Regards,
Vijendra

Hi
Glad to hear that it worked, could you close this issue in that case?
For porting I'd recommend using I-CUBE-Anjay package - https://github.com/AVSystem/I-CUBE-Anjay and devzone tutorials https://iotdevzone.avsystem.com/docs/Anjay_integrations/Anjay_ST_integration/Building_LwM2M_applications/Building_LwM2M_applications_with_I-CUBE-Anjay/
For more support visit our Discord https://discord.avsystem.com/ were we can answer your questions faster
Best regards,
Mieszko


Drop support for PHP 5?

hi @OriHoch @roll @lwinfree ,
Are we prepared to drop support for PHP 5 yet?
My vote is to drop support for PHP 5 -- any software still running on PHP 5 can still use version 0.1.9.

Background:
In #35 I initially dropped support for PHP 5 to be able to upgrade to Carbon 2.  However, there was suggestion at the time that ongoing support for PHP 5 was preferred and the PR went stale.
There is now another PR to upgrade Carbon in #43
If we don't drop support for PHP 5, then this package cannot be used in software that also uses Carbon and uses PHP 7.
There's another irky PHP compatibility issue with #42 where PHP 7.4 now throws \Error instead of \Exception. The ideal solution would be to catch \Throwable but that change would not be compatible with PHP 5.
Cheers
Courtney

... I overlooked there is already an open discussion about this from last year in #39
If I don't hear any objections within the next few days, I will proceed with changes to drop support for PHP 5.

... also, the minimum PHP version supported by any version of Carbon 2 is 7.1.8 -- so this would also drop support for 7.0.

:+1:

Support for PHP 5.6 and 7.0 has been removed.


Allow disabling cache

Allow toggling the cache on or off, globally or per run.
This requires saving the setting in a file somewhere. We should use boltdb to store all settings, including the token, as a key/value pair.

Note that this probably requires creating a new bucket. That way, when we want to clear the cache, we can simply delete a special "cache" bucket.
So really I'm thinking we need two total buckets right now:

cache
settings

We are also calling the file cache.boltdb atm; we should rename to cli.boltdb as a generic name.
@rm-Umar Can you take this one on next?

@rm-Umar generally we should close the issue after it's actually solved (i.e. the relevant PRs/etc are merged). In Github we can automatically do this by putting "Closes " in the PR text, so when the PR merges, Github auto-closes this issue.
I've done that for your PR https://github.com/ipinfo/cli/pull/83 right now, and so you can do this yourself in the future.

Will be available in 2.7.0.


Installation instructions

Is this available in the vscode marketplace? If not, is it possible to install this extension without going through the development setup?
Happy to help with documenting/writing if that's all that's needed.

Hello! 👋
Thanks for your interest! This tool is still very early stage, heavily in development, and not yet released! Please keep a watchful eye 👁 on this repo as we make updates and work towards a release 🚀


Cleaning up extra columns from the expect_similar_means_across_reporters test type

Is your feature request related to a problem? Please describe.
feedback @adedekris received from training session with MoH users
Describe the solution you'd like
Cleaning up extra columns from the expect_similar_means_across_reporters test type
Describe alternatives you've considered
N/A
Additional context
N/A

I actually think this is resolved in the latest version. @adedekris could you take a peek at the latest version please in prod?


[Github] Replace valid PHP expressions with valid Hack expressions in tagline

This repo mentions PHP in the tagline.

done, thanks


Issue connecting to MS SQL Data Warehouse

Please first make sure you have looked at:

Documentation: https://github.com/mkleehammer/pyodbc/wiki
Other issues

Environment
To diagnose, we usually need to know the following, including version numbers.  On Windows, be
sure to specify 32-bit Python or 64-bit:

Python: 3.9
pyodbc: 4.0.31
OS: Win Server 2012
DB: MS Data Warehouse - Analytics Platform Service (APS)
driver: ODBC Driver 13 for SQL Server

Issue
Hi, I'm trying to connect to our data warehouse but I am receiving the following error:
django.db.utils.ProgrammingError: ('42000', '[42000] [Microsoft][ODBC Driver 13 for SQL Server][SQL Server]Setting DateFormat to ymd is not supported. (104409) (SQLExecDirectW)')
I have come across the following post from someone who was trying to connect to Azure Data Warehouse and it explains DateFormat in SQL Data Warehouse cannot be overridden.
https://github.com/michiya/django-pyodbc-azure/issues/77
The post was from 2016 where and I have installed the latest version on pyodbc (July 2021).
Could support for MS APS and also Synapse be included in a future release of pyodbc?
Is there a work around for the time being?
Many thanks.

This does not appear to be a pyODBC issue, but a Django one.

I think Azure Data Warehouse might not support SET DATEFORMAT ymd.
Comment this line out and install from the source, see if that works for you.
https://github.com/michiya/django-pyodbc-azure/blob/a902a956e2a492ec349d4637a618183c14216ec7/sql_server/pyodbc/base.py#L352

Hi absci,
This has worked. Thanks for your help!


Release Google.Cloud.Asset.V1 version 2.5.0-beta01

Changes in this release:

Commit 0ca05f5: Regenerate all APIs using protoc 3.13 and Grpc.Tools 2.31.
Note that the change in gRPC generation is just possibly breaking, as it changes a constructor parameter type (to a base type). This is far less likely to break anyone than changing a method parameter, as method group conversions aren't involved. It also removes the dependency on Grpc.Core from the generated code.
Commit 6eed2d8: feat: added support for per type and partition export for Cloud Asset API.

Ready for review.
It can very well wait till tomorrow for the tooling fix.

Closing, will recreate tomorrow with some needed tooling changes.


Use an XNMT-style YAML file to describe experimental pipelines.

See the following for details:

https://arxiv.org/pdf/1803.00188.pdf
https://github.com/neulab/xnmt

Create a roadmap for XNMT compatibility.


User e2e test

Add user e2e test
Update many of the e2e test setup
Simplify user and data setup before test
Fix cloudrun scripts

Fix #44
Fix #45

The report looks wrong because I fixed the project root. The file was shown as src/app/... before. With the fix it shows as webui/src/app. But the report is not able to coup with that change. But anyway I reverted all codecov related changes, as those are not related to the core of this PR and should not be blocking it.


Support for different PWM pins configurations out of the box

I think this is quite usable thing here.

This PR doesn't includes doc updates yet.

Looks pretty similar to my attempt in #120, except yours is shorter and easier to read :+1:.
Is there a reason you decided to use a trait for the remap stuff instead of just passing the bytes to the macro directly? I think that would be more readable.

Hmm, maybe. It seems it looks like most obvious solution.

My solution is not optimal because I introduced special type for mapping (remap).
Actually, I think we can (and should) avoid it.

I think you can get rid of the extra Remap trait by doing this:
    ( $( $TIMX:ident: $REMAP:expr ( $( ( $($PINX:ident),+ ), ( $($ENCHX:ident),+ ), ( $($DISCHX:ident),* ); )+ ); )+ ) => {
        $( $(
            impl Pins<$TIMX> for $($PINX<Alternate<PushPull>>,)+
            {
                const REMAP: u8 = $REMAP;
                $(const $ENCHX: bool = true;)+
                    $(const $DISCHX: bool = false;)*
                type Channels = ($(Pwm<$TIMX, $ENCHX>),+);
            }
        )+ )+

With that change, and the docs update, this will be good to merge in my eyes

This doesn't work because as I say before it produces same implementations of Pins trait for similar mappings with different pin sets.

Ah, makes sense. So users would have to specify the remap trait?
Could you do something similar to what I did in my PR where there is a special pins_impl which only impls the pins that change during a partial remap?

Of course, I tried to write something similar to it, but in a result it is tricky or not so clear macros.

Maybe enumerating all available configurations in macro invocation is a trade-of solution in this case.

I think that's fine. This macro won't be seen by users, and I don't think we'll be modifying it much

Since #147 which does the same thing is now merged, i'll close this in favour of that


Object detection net(eg:faster_rcnn_resnet101) not worked with  deconv_visualization

Object detection net(eg:faster_rcnn_resnet101) not worked with  deconv_visualization.
With activation_visualization works well.
Error:
---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
<ipython-input-4-9aba9f0fced7> in <module>()
      3                                      layers=layers,
      4                                      path_logdir=os.path.join("Log","Inception5"),
----> 5                                      path_outdir=os.path.join("Output","Inception5"))

/notebooks/workspace/github/tf_cnnvis/tf_cnnvis/tf_cnnvis.py in deconv_visualization(sess_graph_path, value_feed_dict, input_tensor, layers, path_logdir, path_outdir)
    408 def deconv_visualization(sess_graph_path, value_feed_dict, input_tensor = None,  layers = 'r', path_logdir = './Log', path_outdir = "./Output"):
    409     is_success = _get_visualization(sess_graph_path, value_feed_dict, input_tensor = input_tensor, layers = layers, method = "deconv",
--> 410         path_logdir = path_logdir, path_outdir = path_outdir)
    411     return is_success
    412

/notebooks/workspace/github/tf_cnnvis/tf_cnnvis/tf_cnnvis.py in _get_visualization(sess_graph_path, value_feed_dict, input_tensor, layers, path_logdir, path_outdir, method)
    167                 elif layer != None and layer.lower() in dict_layer.keys():
    168                     layer_type = dict_layer[layer.lower()]
--> 169                     is_success = _visualization_by_layer_type(g, value_feed_dict, input_tensor, layer_type, method, path_logdir, path_outdir)
    170                 else:
    171                     print("Skipping %s . %s is not valid layer name or layer type" % (layer, layer))

/notebooks/workspace/github/tf_cnnvis/tf_cnnvis/tf_cnnvis.py in _visualization_by_layer_type(graph, value_feed_dict, input_tensor, layer_type, method, path_logdir, path_outdir)
    225
    226     for layer in layers:
--> 227         is_success = _visualization_by_layer_name(graph, value_feed_dict, input_tensor, layer, method, path_logdir, path_outdir)
    228     return is_success
    229

/notebooks/workspace/github/tf_cnnvis/tf_cnnvis/tf_cnnvis.py in _visualization_by_layer_name(graph, value_feed_dict, input_tensor, layer_name, method, path_logdir, path_outdir)
    289         elif method == "deconv":
    290             # deconvolution
--> 291             results = _deconvolution(graph, sess, op_tensor, X, feed_dict)
    292         elif method == "deepdream":
    293             # deepdream

/notebooks/workspace/github/tf_cnnvis/tf_cnnvis/tf_cnnvis.py in _deconvolution(graph, sess, op_tensor, X, feed_dict)
    335                         c += 1
    336                 if c > 0:
--> 337                     out.extend(sess.run(reconstruct[:c], feed_dict = feed_dict))
    338     return out
    339 def _deepdream(graph, sess, op_tensor, X, feed_dict, layer, path_outdir, path_logdir):

/usr/local/lib/python3.5/dist-packages/tensorflow/python/client/session.py in run(self, fetches, feed_dict, options, run_metadata)
    898     try:
    899       result = self._run(None, fetches, feed_dict, options_ptr,
--> 900                          run_metadata_ptr)
    901       if run_metadata:
    902         proto_data = tf_session.TF_GetBuffer(run_metadata_ptr)

/usr/local/lib/python3.5/dist-packages/tensorflow/python/client/session.py in _run(self, handle, fetches, feed_dict, options, run_metadata)
   1118     # Create a fetch handler to take care of the structure of fetches.
   1119     fetch_handler = _FetchHandler(
-> 1120         self._graph, fetches, feed_dict_tensor, feed_handles=feed_handles)
   1121
   1122     # Run request and get response.

/usr/local/lib/python3.5/dist-packages/tensorflow/python/client/session.py in __init__(self, graph, fetches, feeds, feed_handles)
    425     """
    426     with graph.as_default():
--> 427       self._fetch_mapper = _FetchMapper.for_fetch(fetches)
    428     self._fetches = []
    429     self._targets = []

/usr/local/lib/python3.5/dist-packages/tensorflow/python/client/session.py in for_fetch(fetch)
    243     elif isinstance(fetch, (list, tuple)):
    244       # NOTE(touts): This is also the code path for namedtuples.
--> 245       return _ListFetchMapper(fetch)
    246     elif isinstance(fetch, dict):
    247       return _DictFetchMapper(fetch)

/usr/local/lib/python3.5/dist-packages/tensorflow/python/client/session.py in __init__(self, fetches)
    350     """
    351     self._fetch_type = type(fetches)
--> 352     self._mappers = [_FetchMapper.for_fetch(fetch) for fetch in fetches]
    353     self._unique_fetches, self._value_indices = _uniquify_fetches(self._mappers)
    354

/usr/local/lib/python3.5/dist-packages/tensorflow/python/client/session.py in <listcomp>(.0)
    350     """
    351     self._fetch_type = type(fetches)
--> 352     self._mappers = [_FetchMapper.for_fetch(fetch) for fetch in fetches]
    353     self._unique_fetches, self._value_indices = _uniquify_fetches(self._mappers)
    354

/usr/local/lib/python3.5/dist-packages/tensorflow/python/client/session.py in for_fetch(fetch)
    240     if fetch is None:
    241       raise TypeError('Fetch argument %r has invalid type %r' % (fetch,
--> 242                                                                  type(fetch)))
    243     elif isinstance(fetch, (list, tuple)):
    244       # NOTE(touts): This is also the code path for namedtuples.

TypeError: Fetch argument None has invalid type <class 'NoneType'>

Addition:
Variable  reconstruct (defined at line 327 in tf_cnnvis.py )  is [None, None, None, None, None, None, None, None]. TensorFlow version is 1.9. When I use TensorFlow 1.4, I got same Error as #26

What is your input_sensor set to?
Not familiar with faster rcnn, but with mobilenet ssd (from tensorflow object detection model zoo), I got the same error when using image_tensor as input, switching to FeatureExtractor/MobilenetV2/MobilenetV2/input will work.
You can try skipping the pre-processing blocks and set input_tensor to the input of feature extractor block(or whatever the actual input is). You will need to manually do the pre-processing though.

@wildpig22
Object detection model  is not working with deconv_visualization.
With activation_visualization works well.
import argparse
import sys
import os
import numpy as np
import tensorflow as tf
from Save_load_graph import load_graph
from scipy.misc import imread, imresize
import argparse
import cv2
import time
from tensorflow.examples.tutorials.mnist import input_data
from tf_cnnvis import *
def evalFrozenGraphModel(FLAGS):
graph = load_graph(FLAGS.model_dir + 'frozen_inference_graph.pb'
X = graph.get_tensor_by_name('image_tensor:0')
y_predict = graph.get_tensor_by_name("detection_classes:0")
im = np.expand_dims(imresize(imread(os.path.join("sample_images", "Lenna.png")), (224, 224)), axis=0)
with tf.Session(graph=graph) as sess:
# is_success = activation_visualization(sess_graph_path=graph, value_feed_dict=feed_dict,
#                                       layers=layers, path_logdir=os.path.join("Log", "2.9"),
#                                       path_outdir=os.path.join("Output", "2.9"))
is_success = deconv_visualization(sess_graph_path=graph, value_feed_dict=feed_dict,
input_tensor=None, layers=layers,
path_logdir=os.path.join("Log", "1"),
path_outdir=os.path.join("Output", "1"))
if name == 'main':
parser = argparse.ArgumentParser()
parser.add_argument('--model_dir', type=str,
default='/resnet101_correcteddata/inference_resnet_1class_1batch/',
error     outer_forward_ctxt = forward_ctxt.outer_context
AttributeError: 'NoneType' object has no attribute 'outer_context'
Tried so many things given here https://github.com/InFoCusp/tf_cnnvis/issues/12 and https://github.com/InFoCusp/tf_cnnvis/issues/26 but still getting error.

@wildpig22 Thanks very much! It works! And I read the source code, find that some tensor in  pre-processing is not trainable.

@aggpankaj2
this is my code. It works.

PATH_TO_CKPT = 'data/tf1.9.5819/frozen_inference_graph.pb'

detection_graph = tf.Graph()
with detection_graph.as_default():
    od_graph_def = tf.GraphDef()
    with tf.gfile.GFile(PATH_TO_CKPT, 'rb') as fid:
        serialized_graph = fid.read()
        od_graph_def.ParseFromString(serialized_graph)
        tf.import_graph_def(od_graph_def, name='')

image_tensor = detection_graph.get_tensor_by_name('image_tensor:0')
input_tensor_placehodler = detection_graph.get_tensor_by_name('FirstStageFeatureExtractor/resnet_v1_101/resnet_v1_101/Pad:0')
image = mpimg.imread('data/1.jpg')
image_np_expanded = np.expand_dims(image, axis=0)

layers = ['FirstStageFeatureExtractor/resnet_v1_101/resnet_v1_101/block1/unit_1/bottleneck_v1/conv1/Conv2D',]

is_success = deconv_visualization(sess_graph_path='data/tf1.9.5819/model.ckpt.meta', value_feed_dict={image_tensor: image_np_expanded},
                                  input_tensor=input_tensor_placehodler,
                                  layers=layers, path_logdir=os.path.join("Log", "Inception5"),
                                  path_outdir=os.path.join("Log", "Inception5"))

Addtion TensorFlow versoin is 1.9.

@wildpig22 Did you have any idea about use GPU?
I have two GPUs, but still take large time. GPU-Util is 0%, Memory-Usage is 7857MiB /  8114MiB
Logs:
Reconstruction Completed for FirstStageFeatureExtractor/resnet_v1_101/resnet_v1_101/conv1/Conv2D layer. Time taken = 7.082620 s
Reconstruction Completed for FirstStageFeatureExtractor/resnet_v1_101/resnet_v1_101/block3/unit_1/bottleneck_v1/conv1/Conv2D layer. Time taken = 123.632443 s
Reconstruction Completed for FirstStageFeatureExtractor/resnet_v1_101/resnet_v1_101/block3/unit_9/bottleneck_v1/conv2/Conv2D layer. Time taken = 111.493410 s
Reconstruction Completed for FirstStageFeatureExtractor/resnet_v1_101/resnet_v1_101/block3/unit_17/bottleneck_v1/conv3/Conv2D layer. Time taken = 602.894801 s

@jidebingfeng I haven't figured that out either, sometimes I even have to set clear_devices=True to work...

@wildpig22 In fact, it works well with the code os.environ["CUDA_VISIBLE_DEVICES"] = "0". Some layer is close to input_tensor or it has few GPU operation, so GPU-Util is 0%.

@aggpankaj2 No. I just tried for faster_rcnn_resnet101. I think the deconv_visualization function will work well, if you make sure the layers between input_tensor  and the deconv layer are trainable.

@aggpankaj2  You can judge the layer is trainable by it's dtype.That's the way how I find out the problem of faster_rcnn_resnet101 . Some code:
for op in detection_graph.get_operations():
    t = op.type.lower()
    if t == 'maxpool' or t == 'relu' or t == 'conv2d':
        for input in op.inputs:
            print(input.name, input.dtype)

@jidebingfeng  thanks for your reply. Yes i tried same as per your suggestion but not working

@aggpankaj2 do you mean mobilenetV2 or mobilenetV2+SSD?
Try this code for mobilenetV2+SSD (tensorflow 1.9.0)
import os
import sys
import time
import copy
import h5py
import numpy as np

from tf_cnnvis import *

import tensorflow as tf
from scipy.misc import imread, imresize

with tf.gfile.FastGFile('frozen.pb', 'rb') as f:
    graph_def = tf.GraphDef()
    graph_def.ParseFromString(f.read())
t_input = tf.placeholder(np.float32, name='FeatureExtractor/MobilenetV2/MobilenetV2/input')
tf.import_graph_def(graph_def, {'FeatureExtractor/MobilenetV2/MobilenetV2/input':t_input})

im = np.expand_dims(imresize(imread(os.path.join("./images", "image.jpg")), (300, 300)), axis = 0)
mean = 2/255.0
dev = 1.0
im_processed = im * mean - dev

layers = ["r", "p", "c"]

is_success = deconv_visualization(sess_graph_path = tf.get_default_graph(), value_feed_dict = {t_input : im_processed},
                                      layers=layers,
                                      path_logdir=os.path.join("./Log","ssd"),
                                      path_outdir=os.path.join("./Output","ssd"))

@wildpig22  thanks for your code, but not working.

@aggpankaj2 which model are you using, can you provide a link?


update: Dockerfile, documentation

sudo docker pull quay.io/coreos/etcd:v3.0.0
sudo docker run --name etcd quay.io/coreos/etcd:v3.0.0 /usr/local/bin/etcd --version
sudo docker run --name etcd quay.io/coreos/etcd:v3.0.0 /bin/sh -c "/usr/local/bin/etcd --version"
sudo docker run --name etcd quay.io/coreos/etcd:v3.0.0 -e "ETCDCTL_API=3" /usr/local/bin/etcdctl version

sudo docker run --name etcd quay.io/coreos/etcd:v3.0.0 /usr/local/bin/etcd
sudo docker exec etcd /bin/sh -c "export ETCDCTL_API=3 && /usr/local/bin/etcdctl version"

I test-build docker image, now at https://quay.io/repository/coreos/etcd?tab=tags.
/cc @xiang90 @heyitsanthony

what is the size different between the old image and this one?

@xiang90 13.5MB vs 8.1MB (old)

@heyitsanthony Now it only uses sh and changed the script just to use Dockerfile from top directory.
Thanks.

@heyitsanthony Addressed. Default entry point is now etcd. PTAL.
Thanks.

lgtm, defer to @xiang90

@xiang90 PTAL. Cleaned up the docker command.

lgtm


4.x - fixes for verify OTP methods

What kind of change does this PR introduce?

fix marking verifyotp as post type request
add verify_otp_email method for allowing alternative types of email based verification
add verifyotp to task completion handler for signal dispatch

Bug fix, feature, docs update, ...
Bug fix
What is the current behavior?
Currently, verifyotp requests will fail as they are not specified to be handled as post requests, so they are called a GET and the API will return a response stating the payload is missing.
I have also added an additional utility function for email based verification, providing an api to specific the verification type
What is the new behavior?
Feel free to include screenshots if it includes visual changes.
Additional context
Add any other context or screenshots.

@fenix-hub not sure if you were notified, would appreciate review at some point if possible please :)

@phil-hudson
Looks good to me, thanks!
Mind checking if 3.x is missing this feature too?

yep also missing on 3.x!


Remove discontinued projects

@dom96 opinion on removing stuff?

maybe add them to a discontinued folder.
People would be able to scan it and readopt packages.

Tagging sounds good.

This will be handled on a bigger scale soon with tagging.


Fix ttypo

Just a small ttypo about a t that missed its spot

thank you @JoshuaBehrens
means a lot

Thank you for merging :)


Fix tiling_linear property not beeing used when creating images

A small change I used for a project of mine.

Adds a check in determine_usage_layout_tiling_flags_based_on_image_usage for avk::image_usage::tiling_linear.
It defaults tilling to vk::ImageTiling::eOptimal only if avk::image_usage::tiling_linear is not present.

Indeed it does! It appears that I had a bug somewhere else making image creation not respect the avk::image_usage::tiling_linear flag. I tested it again and it works!
Thanks for all the amazing work and sorry for wasting your time. I will be more careful in any upcoming PR!


Update to v1.4.0

Is there a reason binaries aren't being built for this in staging? It looks like we had binaries for the last PR we reviewed in this repository. It does build locally, but I'm still testing.

Amending so that it will rebuild.


chmod

this is the suggested solution to #10. @leontebbens please test and merge when you can

Nice, thank you very much!


Issues reproducing the outputs of the examples/pixel_centroid_mnemonics.ipynb notebook

When trying to run all of the example notebooks to test the functionality of the package, I encountered a crash when trying to run the last cell of the pixel_centroid_mnemonics.ipynb notebook and was also not able to reproduce the figure output in the second-to-last cell.
For the second-to-last cell, I get this output image:

while the readthedocs page shows:

Meanwhile, for the last cell, I get a single figure that is successfully output:

although it looks very different from the readthedocs image:

but then I get the following error message:
UFuncTypeError                            Traceback (most recent call last)
Cell In[13], line 2
      1 filename = './event1_2079_xmean.gif'
----> 2 spk.flux_spatial_timelapse_animation(spk.fg_array[52000:53000], spk.fg_flux[52000:53000], filename=filename)

File ~/miniconda3/envs/spelunker2/lib/python3.11/site-packages/spelunker/spelunker.py:2232, in load.flux_spatial_timelapse_animation(self, fg_array, fg_time, fg_flux, start, stop, interval, filename)
   2229     im = ax1.imshow(short_fg_array[idx], animated=True)
   2230     im.set_clim(vmin=min, vmax=max)
-> 2232     im3 = ax2.vlines(i, np.min(short_fg_flux), np.max(short_fg_flux),  animated=True, color='red')
   2233     ims.append([im, im2, im3])
   2235 fig.suptitle('Guidestar spatial timeseries animation')

File ~/miniconda3/envs/spelunker2/lib/python3.11/site-packages/numpy/core/fromnumeric.py:2953, in min(a, axis, out, keepdims, initial, where)
   2836 @array_function_dispatch(_min_dispatcher)
   2837 def min(a, axis=None, out=None, keepdims=np._NoValue, initial=np._NoValue,
   2838         where=np._NoValue):
   2839     """
   2840     Return the minimum of an array or minimum along an axis.
   2841
   (...)
   2951     6
   2952     """
-> 2953     return _wrapreduction(a, np.minimum, 'min', axis, None, out,
   2954                           keepdims=keepdims, initial=initial, where=where)

File ~/miniconda3/envs/spelunker2/lib/python3.11/site-packages/numpy/core/fromnumeric.py:88, in _wrapreduction(obj, ufunc, method, axis, dtype, out, **kwargs)
     85         else:
     86             return reduction(axis=axis, out=out, **passkwargs)
---> 88 return ufunc.reduce(obj, axis, dtype, out, **passkwargs)

UFuncTypeError: ufunc 'minimum' did not contain a loop with signature matching types (dtype('<U4'), dtype('<U4')) -> None

Also, note that the version of the notebook on GitHub is not exactly consistent with that on readthedocs, and note that the pid2079_observation04_visit1.dat file isn't uploaded to GitHub which requires that users run the spk.gauss2d_fit function which isn't described in the notebook.
This issue was made as part of the review for https://github.com/openjournals/joss-reviews/issues/6202

Okay, I'll fix this ASAP

@taylorbell57 For some reason, the mnemonics are not lining up as they did before. I'll have to look into this, but this will take me a while

@taylorbell57 I have fixed the reproducibility of this example. Also, I removed the animation section for now to keep the focus on mnemonics.

Everything works great now, except you need to change
gaussfit_table = ascii.read('/Users/galagabits/Developer/FGS-Spelunker/JWST-FGS-Spelunker/notebooks/examples/data/pid2079_observation04_visit1_short.dat') # Navigate to the included Gaussian results file

to
gaussfit_table = ascii.read('./data/pid2079_observation04_visit1_short.dat') # Navigate to the included Gaussian results file

You should also remove the cell at the top that has
cd /Users/galagabits/Developer/FGS-Spelunker/

which isn't relevant for other users

@taylorbell57, okay! This is fixed


Developer setup

I have no idea if my setup is right, the README says "install the package in development mode" but just provides instructions to clone the repo, init submodules, then call setup.py (which will fail because skbuild isn't installed) to compile llama.cpp.
I'm left wondering how to actually set up this project for development. After random stuff breaking / conflicting with my system, I made a stab at making this more explicit with poetry & a virtualenv.
Feedback always welcome

hmmmm there might be a problem with this, i assumed poetry install --all-extras would pickup setup.py's server extra and install fastapi but that doesn't seem to be the case:
(llama-cpp-python-py3.10) humbaba:llama-cpp-python lucas.doyle$ MODEL=./vendor/llama.cpp/models/ggml-vocab.bin VOCAB_ONLY=true python3 -m llama_cpp.server
Traceback (most recent call last):
  File "/Users/lucas.doyle/.pyenv/versions/3.10.11/lib/python3.10/runpy.py", line 196, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "/Users/lucas.doyle/.pyenv/versions/3.10.11/lib/python3.10/runpy.py", line 86, in _run_code
    exec(code, run_globals)
  File "/Users/lucas.doyle/Dropbox/workspace/llama-cpp-python/llama_cpp/server/__main__.py", line 22, in <module>
    from fastapi import Depends, FastAPI
ModuleNotFoundError: No module named 'fastapi'

Maybe direct people to use pip instead?

i guess poetry extras and setup.py extras are two different things, poetry seems to maintain them in pyproject.toml: https://python-poetry.org/docs/pyproject/#extras
solution: going to add a section for the server there too i guess, meanwhile will give people the option of using pip

fixed up the last commit to handle pip and / or poetry

@Stonelinks thanks for this, I have been battling this and installing things manually

@Stonelinks thanks for the contribution, sorry this took so long to merge, appreciate the hard work.


Add NixOS wiki

not sure if this qualifies as the old wiki was already independent but most of the community has migrated to the official one.

Thank you for the submission!
I don't currently plan to redirect between independent wikis, even if it is from an unofficial to an official one. A big reason is scope, but also because it requires adding a new permission for the origin domain. Requesting new permissions is a bit disruptive for users as it requires them to approve the new permissions, which isn't really worth it for supporting specific one-offs.


drivers: ieee802154: improve ACK header IE config

NOT meant for Zephyr v3.5. A section will be added to the release notes for 3.6 once those are out.
Improves standard conformance of the IEEE802154_CONFIG_ENH_ACK_HEADER_IE option and introduces certain "soft MAC" capabilities around header IEs:

Introduces types and helpers that allow driver maintainers to represent, parse, write and validate header IEs.
Introduces helper functions to access non-aligned fields in header IEs, namely element IDs.

Updates the only existing L2 and driver pair that uses IEEE802154_CONFIG_ENH_ACK_HEADER_IE: OpenThread platform radio and nRF5 and improves header IE validation in the nRF5 driver.
This change should help further driver maintainers to support OpenThread's CSL and vendor IE extensions. It is based on the rules specified in RFC #61227.
It is also a precondition to generically support both, "soft MAC" and "hard MAC", approaches to header IEs in the TSCH protocol, namely the time synchronization IE.
Fixes: #62940 (Enhancement), further rationale and analysis to be found there.

@rlubos @jciupis - I think you could revisit now. @edmont ack'ed plus @jciupis just needs to re-ack. I pushed to cater for feedback.


Improve search

Fix #144
If you search for a single term, it will use both normal (old) search and Wildcard search. Multiple terms will use both normal and Proximity search (with a distance of 5, which seems good)
Example queries:
Old search:

covi: 0 results
covid: 63 results
corona: 2 results
coronavirus: 38 results
deep neural network: 0 results

New search:

covi: 66 results
covid: 66 results
corona: 41 results
coronavirus: 39 results
deep neural network: 1 result  (Classification of COVID-19 in chest X-ray images using DeTraC deep convolutional neural network)

It's also possible to add Fuzzy Search, but I tried and it didn't seem to improve the results.
For instance, if you search COVID, a title containing provide will score more (appear first) than one containing COVID-19. Another example is if you search for corona, a title containing colony will appear before one with coronavirus
I tried to use Boosting, but it doesn't seem to work with Term Modifiers.

IssueHunt Summary

Referenced issues
This pull request has been submitted to:

#144: Search should probably be fuzzy not exact

I forgot to update the tests. My bad.


Dynamically set action_url for adding a new item in snippet index.html

Is your proposal related to a problem?
Hey folks!
On a project I needed to pass some GET query parameters from the snippet index view to the snippet create view, based on the current value of the filter, to prefill an initial value on the snippet create form.
Right now, the action_url value is being set here, meaning that it takes a static parameter from the view.
The only option I see is to fully override the index.html template by extending the base one, copying the whole content block and setting the desired value.
Describe the solution you'd like
Ideally, we wouldn't take the static value, but instead use get_add_url() here which we can override in a custom IndexView. This seems easier than overriding basically the whole template, and is already being done in generic views. (view, template)
Is there a reason why the behavior is different in those two cases?
Describe alternatives you've considered
As I mentioned above, overriding the template seems like the only way to do it.
Additional context
If we agree that this is something that should be changed in the future, I could potentially take on the work of doing so and creating a PR, if you want me to.

Hi, thank you for the report. This seems like what #11133 aims to fix.

Is there a reason why the behavior is different in those two cases?

I don't think there's a specific reason. The view was gradually migrated over from a function based view to a class-based view, from using its own template, to extending the generic views' templates. It's likely this just wasn't picked up in the process 🙂

I agree, it does seem like it's the same thing. My bad, I searched for get_add_url in issues, but not in pull requests as well. I think that this can be closed, thanks for the quick reply!


switch is not accessible via keyboard navigation

the switch refill is not accessible via keyboard navigation nor are you able to toggle the switch via the keyboard. I would be interested in hearing the communities thoughts around refills and accessibility.

Yes, this is a huge bummer.
We are currently re-building Refills from a ground-up with a focus on a11y. An early WIP can be found here: http://refills.netlify.com/. Stay tuned!


Temporarily disabled Linux x86_64 builds

Disabling it in case of issues on the host.

@alalek @asmorkalov @fengyuentau
I'm merging it to prevent failures in opencv and opencv_contrib repositories. Infra pipelines are not disabled on Linux x86_64, if they fail only on this machine - it's okay.


Task ends before the audiosprites are generated.

It seems as though the task ends right after starting the audiosprite command. The gulp task should end once the audiosprite command is complete and the audiosprites are actually generated.

It seems that the problem is in audiosprite library. I'll check it in a few days.

Hmm. Here is one of my tasks;
gulp.task("generate-sfx-audiosprite", function () {
     gulp.src([
        "audio/fx_1.m4a",
        "audio/fx_2.m4a",
        "audio/fx_3.m4a",
        "audio/fx_4.m4a",
        "audio/fx_5.m4a",
        "audio/fx_6.m4a",
        "audio/fx_7.m4a",
        "audio/fx_8.m4a",
        "audio/fx_9.m4a",
        "audio/fx_10.m4a",
        "audio/fx_loop1.m4a"
        "audio/fx_loop2.m4a"
        "audio/fx_loop3.m4a"
    ]).pipe(audiosprite({
        output: "sfx",
        export: "ogg,mp3,m4a",
        loop: "fx_loop1 fx_loop2 fx_loop3"
    })).pipe(gulp.dest("/assets/audio/"));
});

You've missed a return statement.


Flags per developer environment?

Hey there!, the product looks great and I cant wait to start using it!
While configuring our envs, one issue arose regarding environments
production/preview/development all seem to be shared environments, which makes impossible to test something 100% locally without messing with the shared environments (and changing another devs app behavior)
I looked around the docs and couldnt find any way to do either flag override locally, or just mock the flags that we need without needing to provide a configuration key (everything should be local at this point).
Before talking approaches (happy to contribute if needed), is this something missing? or am I looking at it the wrong way?
Thanks!

Hey, thanks for reaching out!
production/preview/development share the definitions of flags (the available variants) but do not share whether a flag is on/off or the targeting rules. This is meant so that you have some guarantees over flags across environments, but can change what each flag evaluates to per environment (or even per user/visitor/trait per environment).
If you want to target specific people, you can use individual user targeting per environment.
If you want flags to resolve to different variants per development branch, you can pass the branch in as a trait and use a custom rule to resolve to a specific variant for each branch, but this should not be necessary in most cases.
Could you double check that you are passing a different envKey to configure() in each environment? You can find the appropriate keys to pass in under "[Your Project] > Settings > Keys > Flags"
I'm happy to jump on a call to make sure you're off in the right direction!

I get what you mean about the definitions, and thats totally fine (and def expected, and nice to have) and I was using all the different envKey environments, for development, preview and production when I gave it a go.
Maybe I can explain better in an example?
We're developing a Cart functionality at the moment, which is being done in parts (cart view, product view modification, header with cart icons and actions), and we have some branches merged, some branches in development, etc, but until everything is done, this feature is disabled by default.
This means that a given dev, can be either developing against master on a feature totally unrelated to the cart, and they do not want/need to see it enabled. Another dev could be working on bits and pieces of the cart, so they need to see it enabled.
Seems to me that without user/trait targeting (as you mention) there's no way for a developer to have a specific set of flags enabled/disabled locally, without affecting anybody else (or even getting into the UI for that matter, because there could be security/credentials reasons on why they cant).
I'm thinking of a JSON you can specify somehow that would override default and platform flags.
I hope that makes a bit more sense!

Ah, I got you now. That's an interesting use case! I'll give this some more thought.
user/trait targeting were indeed the solutions I had in mind to solve this, but I can see how this could get annoying if you're switching branches often.
Aside from the one you proposed, multiple other solutions come to mind:

Making it possible to set default traits. Then your branch name could be passed in by you as a default trait and you could adapt the feature flag rules. Something like http://npm.im/current-git-branch could be used inside of next.config.js to gather the current branch name.
Making happykit aware of the current branch, and supporting branches natively in the UI. This would be super intuitive, but limits this solution to branches. Could there be something else causing devs to want the same?
~Abandon the production/staging/development thing and build it on top of branches. This would be the most flexible but kinda suck as you'd have to maintain your feature flags across many different, sometimes short lived, branches~


IsarError: Cannot open Environment: MdbxError (11)

Steps to Reproduce
I got many report from craslytics
Fatal Exception: io.flutter.plugins.firebase.crashlytics.FlutterError: IsarError: Cannot open Environment: MdbxError (11): Try again. Error thrown null.
       at FirebaseCrashlytics.recordError(firebase_crashlytics.dart:120)
       at main.<fn>(main.dart:66)
       at CrashReport.executeInZoned.<fn>(crash_report.dart:54)

I can't reproduce this issue on my devices.
Here are few reported devices:
Galaxy Note10+
Galaxy A02s
Galaxy A71 5G
skythtek  816TPC
OPPO CPH2273
OPPO CPH2185
Xiaomi Redmi Note 8 Pro
Code sample
final isar = await Isar.open(
[schemaList],
directory: dir,
);
Details

Platform: android 9, 10, 13
Flutter version: 3.3.5
Isar version: 3.0.2

[x] I searched for similar issues already
[x] I filled the details section with the exact device model and version
[ ] I am able to provide a reproducible example

Unfortunately it's very difficult to help without a way to reproduce the issue. Maybe you find some steps that trigger it.
Do you open multiple Isar instances?

Duplicate of #570

Unfortunately it's very difficult to help without a way to reproduce the issue. Maybe you find some steps that trigger it.
Do you open multiple Isar instances?

I use only one Isar instance in a singleton class

I have this problem using a singleton from the db with get_it


Error: Unable to resolve module ./index from \node_modules\react-native\scripts/.: The module ./index could not be found from \node_modules\react-native\scripts/.. Indeed, none of these files exist:

🐛 Bug Report
I am getting this error when upgrade my react native.
It says
Error: Unable to resolve module ./index from  \node_modules\react-native\scripts/.: The module ./index could not be found from \node_modules\react-native\scripts/.. Indeed, none of these files exist:
To Reproduce
react-native run-android
Expected Behavior
Should run the App
Code Example
{
"name": "RedCrow",
"version": "0.0.1",
"private": true,
"scripts": {
"start": "node node_modules/react-native/local-cli/cli.js start",
"test": "jest"
},
"dependencies": {
"axios": "^0.18.0",
"leaflet": "^1.4.0",
"moment": "^2.24.0",
"native-base": "^2.12.1",
"node-pre-gyp": "^0.12.0",
"prop-types": "^15.7.2",
"react": "^16.8.4",
"react-dom": "^16.8.4",
"react-leaflet": "^2.2.1",
"react-native": "^0.59.0",
"react-native-camera": "^1.13.1",
"react-native-fs": "^2.13.3",
"react-native-gesture-handler": "^1.1.0",
"react-native-image-crop-picker": "^0.22.0",
"react-native-image-picker": "^0.28.0",
"react-native-modal": "^7.0.2",
"react-native-vector-icons": "^6.4.1",
"react-native-video": "^4.4.0",
"react-native-webview": "^5.3.0",
"react-native-webview-leaflet": "^4.1.22",
"react-navigation": "^3.3.2",
"react-navigation-props-mapper": "^0.3.0",
"react-redux": "^6.0.1",
"realm": "^2.25.0",
"redux": "^4.0.1",
"redux-form": "^8.1.0",
"rn-fetch-blob": "^0.10.15",
"util": "*"
},
"devDependencies": {
"babel-jest": "^24.5.0",
"jest": "^24.5.0",
"metro-react-native-babel-preset": "0.51.1",
"react-test-renderer": "16.6.3"
},
"jest": {
"preset": "react-native"
}
}
Environment
"react": "^16.8.4",
"react-native": "^0.59.0",

@moinulhuq! Yeah I have been the same :(.

give it a try, does react-native start -- --reset-cache works for you?

same issues

Got the same issue initially but after running react-native start -- --reset-cache I got:

*I am inside the right folder btw

I restore my project and use new new method to upgrade：
1.change the version of react and react-native
"react": "16.8.3",
"react-native": "0.59.0",
2 .run npm install then react-native upgrade --legacy ，that will change your some files (decide whether to cover as needed)
3. need upgrade you gradle version(>4.10.1) and android sdk(>=28)
4.rebuild you project and upgrade success without this error

NOTE: One difference between my error and OP's is I'm unable to resolve the module ./index from /node_modules/react-native/. (as opposed to /node_modules/react-native/scripts/.).
I'll second this. After upgrading from 0.58.6 to 0.59.1 I get this error on both iOS and Android. Here is my react-native info output:
info
  React Native Environment Info:
    System:
      OS: Linux 4.18 Ubuntu 18.10 (Cosmic Cuttlefish)
      CPU: (16) x64 AMD Ryzen 7 2700X Eight-Core Processor
      Memory: 389.57 MB / 15.68 GB
      Shell: 5.5.1 - /usr/bin/zsh
    Binaries:
      Node: 11.10.1 - /usr/bin/node
      Yarn: 1.13.0 - /usr/bin/yarn
      npm: 6.7.0 - /usr/bin/npm
    SDKs:
      Android SDK:
        API Levels: 23, 24, 25, 26, 27, 28
        Build Tools: 28.0.2, 28.0.3
        System Images: android-28 | Google APIs Intel x86 Atom
    IDEs:
      Android Studio: 3.3 AI-182.5<IP_ADDRESS>14842
    npmPackages:
      react: 16.8.3 => 16.8.3
      react-native: 0.59.1 => 0.59.1
    npmGlobalPackages:
      react-native-cli: 2.0.1

I can't imagine it's an issue with specific Android/iOS config and build files since I get the same error across platforms, but I can provide them if necessary. My gradle version is ~4.10.2 and Android SDK version is ~28.
I've taken the usual steps when encountering a problem while updating RN:

deleting React, metro, yarn, and haste caches in $TMPDIR
deleting node_modules
react-native start -- --reset-cache
cleaning build folders for both iOS and Android

No luck so far, any help would be appreciated.

same issue + 1

After creating a new project using React-native 0.59 , i copied both files .flowconfig and babel.config.js and it started to work again

the issue only happens when I press Play button and build using xcode, but when I run npm start -- --reset-cache it will works

Moved iOS build cache directory from ~/.rncache to ~/Library/Caches/com.facebook.ReactNativeBuild

Could be because the cache directory already changed
refer to @chenxin0916 ,Handing conflicts
then
run react-native start --cache-reset to  clear the bundle cache first
now you can run-ios/android

run
react-native start -- --reset-cache
then
react-native run-android in separate command line
works fine for me

NOTE: One difference between my error and OP's is I'm unable to resolve the module ./index from /node_modules/react-native/. (as opposed to /node_modules/react-native/scripts/.).
I'll second this. After upgrading from 0.58.6 to 0.59.1 I get this error on both iOS and Android. Here is my react-native info output:
info
  React Native Environment Info:
    System:
      OS: Linux 4.18 Ubuntu 18.10 (Cosmic Cuttlefish)
      CPU: (16) x64 AMD Ryzen 7 2700X Eight-Core Processor
      Memory: 389.57 MB / 15.68 GB
      Shell: 5.5.1 - /usr/bin/zsh
    Binaries:
      Node: 11.10.1 - /usr/bin/node
      Yarn: 1.13.0 - /usr/bin/yarn
      npm: 6.7.0 - /usr/bin/npm
    SDKs:
      Android SDK:
        API Levels: 23, 24, 25, 26, 27, 28
        Build Tools: 28.0.2, 28.0.3
        System Images: android-28 | Google APIs Intel x86 Atom
    IDEs:
      Android Studio: 3.3 AI-182.5<IP_ADDRESS>14842
    npmPackages:
      react: 16.8.3 => 16.8.3
      react-native: 0.59.1 => 0.59.1
    npmGlobalPackages:
      react-native-cli: 2.0.1

I can't imagine it's an issue with specific Android/iOS config and build files since I get the same error across platforms, but I can provide them if necessary. My gradle version is ~4.10.2 and Android SDK version is ~28.
I've taken the usual steps when encountering a problem while updating RN:

deleting React, metro, yarn, and haste caches in $TMPDIR
deleting node_modules
react-native start -- --reset-cache
cleaning build folders for both iOS and Android

No luck so far, any help would be appreciated.

I have the same issue. Have you found the solution?

After creating a new project using React-native 0.59 , i copied metro.config.js, .flowconfig and babel.config.js to the old project and it started to work again

Thanks you. I tried and success :). Everyone can try

I get the same issu, after cache clear i get app stuck on "downloading javascript bundle 100%" and black screen :(
no error on metro console

After creating a new project using React-native 0.59 , i copied metro.config.js, .flowconfig and babel.config.js to the old project and it started to work again

I just copied metro.config.js and it works perfectly. Thanks a lot

can someone past the content and path of the metro.config.js file please ?

Hello everyone - this issue seems to be related to your experience upgrading between versions. We know this has been a long lasting pain for the community so starting v0.59 we have introduced a new flow via the new CLI.
But, to upgrade to that version, you still need some potentially manual steps - we suggest you use the rn-diff-repo to accomplish this.
Given that this is not strictly a bug with the library itself I'll close this, but if someone can create a repro that has this issue with a freshly created react-native init project we can reopen it and discuss it further 🤗
@alainib you can use the one in https://github.com/facebook/react-native/tree/0.59-stable/template

Thanks @kelset! It took me a while to fix this. Like @saraztr  and others said, copying metro.config.js from a 0.59 new projects fixes the issue.
@alainib , here's the metro.config.js content:
`/**

Metro configuration for React Native
https://github.com/facebook/react-native

@format
*/

module.exports = {
transformer: {
getTransformOptions: async () => ({
transform: {
experimentalImportSupport: false,
inlineRequires: false,
},
}),
},
};`

same issues
Error: Unable to resolve module ./index from \node_modules\react-native\scripts/.: The module ./indexcould not be found from\node_modules\react-native\scripts/.`
React Native Environment Info:
System:
OS: Windows 10
CPU: (4) x64 Intel(R) Core(TM) i3-3110M CPU @ 2.40GHz
Memory: 569.59 MB / 3.89 GB
Binaries:
Yarn: 1.12.3 - C:\Users\Vivek\AppData\Roaming\npm\yarn.CMD
npm: 6.4.1 - C:\Program Files\nodejs\npm.CMD
IDEs:
Android Studio: Version  <IP_ADDRESS> AI-182.5<IP_ADDRESS>14842
Environment :
"react": "16.8.3",
"react-moment": "^0.8.4"

@VivekkChudasama  try to

npm cache clean --force
install metro in package.json devDependencies
put the metro.config.js posted before
remove node_modules folder and npm install again
gradlew clean on android (cd android ; ./gradlew clean ; cd .. )
remove pods folder on ios and install again (cd ios ; pod install ; cd .. )

@VivekkChudasama WHat do you mean by put the metro.config.js posted before?

@ahmad6242, create a new file in your RN project root folder named metro.config.js with the content below:
/**

Metro configuration for React Native
https://github.com/facebook/react-native

@format
*/

module.exports = {
transformer: {
getTransformOptions: async () => ({
transform: {
experimentalImportSupport: false,
inlineRequires: false,
},
}),
},
};

I tried cleaning the cache, removing the node_modules directory and reinstalling using npm install, with no luck. I already had a metro.config.js file in the project root directory. I am using react v16.8.5 and react-native v0.59.1

I tried cleaning the cache, removing the node_modules directory and reinstalling using npm install, with no luck. I already had a metro.config.js file in the project root directory. I am using react v16.8.5 and react-native v0.59.1

did you have last metro in dev dependancies ?

Same issue, I even tried a new app from scratch without changing anything and I got the same error...

And i have same issue, with new app:
react-native init TestProject --template typescript
@soetedja solution helped me

And i have same issue, with new app:
react-native init TestProject --template typescript
@soetedja solution helped me

Why is this closed? I have the same issue trying to create an app from scratch.

After creating a new project using React-native 0.59 , i copied metro.config.js, .flowconfig and babel.config.js to the old project and it started to work again

I just copied metro.config.js and it works perfectly. Thanks a lot

Can you please explain it clearly. If I am using React-native 0.59 project what should I do to resolve from this error

run
react-native start -- --reset-cache
then
react-native run-android in separate command line
works fine for me

Thankyou..It worked for me

Hi all,
I have the same issue after installing reac-native vector icons. Now, I tried to create new app to check but it still failed. I don't know why. I tried some solution up there but it still not work.
Please help me!
Thanks in advance!

Nothing works still getting the same error

can someone help me out with this exactly

Same problem here. I have built an app with react-native init test-project and I have obtained the error reported here. Reset cache did not work.

@devangelmotta it just happen today it was working fine till yesterday..!!

Metro server instance here is stared by runAndroid.js if your asks for react-native run-android
I can help you with android only, I am giving you fix onwindows, if you are on linux then I am sure you definetely know how to apply these fixes on your machine.
Problem is with Working Directory, Metro instance is launched with wrong working directory and no project root is passed in launchPackager
Threre are two fixes for this issue, apply only one of the below
Update node_modules\react-native\scripts\launchPackager.bat file.
@echo off
title Metro Bundler
call .packager.bat

// delete this line
node "%~dp0..\cli.js" start

Add this line
node "%~dp0..\cli.js" start --projectRoot ../../../

pause
exit

We are giving projectPath to Metro instance here,
Or in<EMAIL_ADDRESS>edit this,
const procConfig = {

    // delete this line
    cwd: scriptsDir

    // add this line
    cwd: cwd()
};

We lauched Metro launcher in our project root directory

Thanks alot @nazreinkaram

thank

Metro server instance here is started by runAndroid.js if you ask for react-native run-android
I can help you with android only, I am giving you fix on windows, if you are on Linux then I am sure you definitely know how to apply these fixes on your machine.
Problem is with Working Directory, Metro instance is launched with wrong working directory and no project root is passed in launchPackager
Threre are two fixes for this issue, apply only one of the below
Update node_modules\react-native\scripts\launchPackager.bat file.
@echo off
title Metro Bundler
call .packager.bat

// delete this line
node "%~dp0..\cli.js" start

Add this line
node "%~dp0..\cli.js" start --projectRoot ../../../

pause
exit

We are giving project root path to Metro instance here,
Or in<EMAIL_ADDRESS>edit this,
const procConfig = {

    // delete this line
    cwd: scriptsDir

    // add this line
    cwd: process.cwd()
};

We launched Metro launcher with working directory to our project root

thanks alot bro .
your solution worked for me

react-native start -- --reset-cache

Why should i always suppose to write this

Metro server instance here is started by runAndroid.js if you ask for react-native run-android
I can help you with android only, I am giving you fix on windows, if you are on Linux then I am sure you definitely know how to apply these fixes on your machine.
Problem is with Working Directory, Metro instance is launched with wrong working directory and no project root is passed in launchPackager
Threre are two fixes for this issue, apply only one of the below
Update node_modules\react-native\scripts\launchPackager.bat file.
@echo off
title Metro Bundler
call .packager.bat

// delete this line
node "%~dp0..\cli.js" start

Add this line
node "%~dp0..\cli.js" start --projectRoot ../../../

pause
exit

We are giving project root path to Metro instance here,
Or in<EMAIL_ADDRESS>edit this,
const procConfig = {

    // delete this line
    cwd: scriptsDir

    // add this line
    cwd: process.cwd()
};

We launched Metro launcher with working directory to our project root

Thanks Buddy This is working for me Also.....

thanks a lot

Metro server instance here is started by runAndroid.js if you ask for react-native run-android
I can help you with android only, I am giving you fix on windows, if you are on Linux then I am sure you definitely know how to apply these fixes on your machine.
Problem is with Working Directory, Metro instance is launched with wrong working directory and no project root is passed in launchPackager
Threre are two fixes for this issue, apply only one of the below
Update node_modules\react-native\scripts\launchPackager.bat file.
@echo off
title Metro Bundler
call .packager.bat

// delete this line
node "%~dp0..\cli.js" start

Add this line
node "%~dp0..\cli.js" start --projectRoot ../../../

pause
exit

We are giving project root path to Metro instance here,
Or in<EMAIL_ADDRESS>edit this,
const procConfig = {

    // delete this line
    cwd: scriptsDir

    // add this line
    cwd: process.cwd()
};

We launched Metro launcher with working directory to our project root

Thanks a lot. It works for me

@nazreinkaram 's solution worked for me too. The first one that is.

Maybe this is just me, but:
react-native start -- --reset-cache
returns
error Unexpected token <
Also, starting new project using react-native init blablabla and then cd blablabla then react-native run-android gives me the same error.
However, the error went away if I use expo.

@kelset This seems to be an issue with new project. Please reopen.

Yeah, this seems to still be an issue. Installed a clean version of react-native, npm, node etc and am unable to call react-native run-ios alone. I first need to run react-native start -- --reset-cache in a seperate terminal to get my vanilla app to work. Note I've not changed anything in the generated project.

Metro server instance here is started by runAndroid.js if you ask for react-native run-android
I can help you with android only, I am giving you fix on windows, if you are on Linux then I am sure you definitely know how to apply these fixes on your machine.
Problem is with Working Directory, Metro instance is launched with wrong working directory and no project root is passed in launchPackager
Threre are two fixes for this issue, apply only one of the below
Update node_modules\react-native\scripts\launchPackager.bat file.
@echo off
title Metro Bundler
call .packager.bat

// delete this line
node "%~dp0..\cli.js" start

Add this line
node "%~dp0..\cli.js" start --projectRoot ../../../

pause
exit

We are giving project root path to Metro instance here,
Or in<EMAIL_ADDRESS>edit this,
const procConfig = {

    // delete this line
    cwd: scriptsDir

    // add this line
    cwd: process.cwd()
};

We launched Metro launcher with working directory to our project root

The only way to run vanilla app is to update above workaround from our savior @nazreinkaram . Or, initiate using EXPO.

I can't believe a fresh app, started from scratch, can't run.
@awan2008 would you please tell me where's the runAndroid.js file that needs to be modified?

I can't believe a fresh app, started from scratch, can't run.
Edit: nvm, found it.
Edit 2: Well, still not working after changing runAndroid.js. Same index.js not found error.
Edit3: On mac, option 2 did not work. However, option 1 (edit node_modules/react-native/scripts/packager.sh) with node "./cli.js" start --projectRoot ../../ worked.

Why would changing runAndroid.js will work on mac? I guess you are creating iOS app on it, so runAndroid.js gets executed only for android devices
There exists a runOS.js in @react-native-community\cli\build\commands\runIOS. Tempering this file accordingly may work but I am not sure as I haven't looked into it. Good Luck

I can't believe a fresh app, started from scratch, can't run.
Edit: nvm, found it.
Edit 2: Well, still not working after changing runAndroid.js. Same index.js not found error.
Edit3: On mac, option 2 did not work. However, option 1 (edit node_modules/react-native/scripts/packager.sh) with node "./cli.js" start --projectRoot ../../ worked.

Why would changing runAndroid.js will work on mac? I guess you are creating iOS app on it, so runAndroid.js gets executed only for android devices
There exists a runOS.js in @react-native-community\cli\build\commands\runIOS. Tempering this file accordingly may work but I am not sure as I haven't looked into it. Good Luck

Because I'm also running Android on Mac? But never mind, option 1 works fine. I still can't believe this is an issue though.
P.S: replied with a wrong account previously :)

run
react-native start -- --reset-cache
then
react-native run-android in separate command line
works fine for me

Tanks, @soetedja It worked for me too

I can't believe a fresh app, started from scratch, can't run.
Edit: nvm, found it.
Edit 2: Well, still not working after changing runAndroid.js. Same index.js not found error.
Edit3: On mac, option 2 did not work. However, option 1 (edit node_modules/react-native/scripts/packager.sh) with node "./cli.js" start --projectRoot ../../ worked.

Why would changing runAndroid.js will work on mac? I guess you are creating iOS app on it, so runAndroid.js gets executed only for android devices
There exists a runOS.js in @react-native-community\cli\build\commands\runIOS. Tempering this file accordingly may work but I am not sure as I haven't looked into it. Good Luck

Because I'm also running Android on Mac? But never mind, option 1 works fine. I still can't believe this is an issue though.
P.S: replied with a wrong account previously :)

If you are curious you should try debugging, At least try to add a breakpoint or simply console.log inrunAndroid.js before spawn() in startServerInNewWindow() to check what exactly is getting passed into spawn as third param for launching bat file.

run
react-native start -- --reset-cache
then
react-native run-android in separate command line
works fine for me

this one worked for me thanks

react-native start -- --reset-cache
然后
react-native run-android在单独的命令行中运行
对我来说很好
Thanks

@kelset pls re-open and check out @nazreinkaram's response

@hoboman313 This will be fixed in 0.59.2 which was planned to release today

@VivekkChudasama try to

npm cache clean --force
install metro in package.json devDependencies
put the metro.config.js posted before
remove node_modules folder and npm install again
gradlew clean on android (cd android ; ./gradlew clean ; cd .. )
remove pods folder on ios and install again (cd ios ; pod install ; cd .. )

All Ready Update react-native version and metro.config.js available in posted before.
react-native start -- --reset-cache

after Run - react-native run-android
clear cache after 2time run this command after successfully build.

Thanks a lot. It works for me

I resolved it by rollback the RN version.
modify package.json
"react-native": "0.58.6"
then clear cache:
cd path/to/project
rm -rf ~/.rncache
rm package-lock.json
sudo rm $TMPDIR/*
sudo rm -rf $TMPDIR/*
watchman watch-del-all
watchman watch-del-all
rm yarn.lock
rm -rf node_modules/
rm -rf android/build
#install node_modules
yarn
react-native link
#run simulator
react-native run-android

@nazreinkaram  Thanks you so much. It's end up my 4 hours to fix this prob.

step 1: npm install concurrently -D
step 2: add in your package.json scripts(start) "concurrently "react-native start --reset-cache" "react-native run-android""
step 3 : npm start

Metro server instance here is started by runAndroid.js if you ask for react-native run-android
I can help you with android only, I am giving you fix on windows, if you are on Linux then I am sure you definitely know how to apply these fixes on your machine.
Problem is with Working Directory, Metro instance is launched with wrong working directory and no project root is passed in launchPackager
Threre are two fixes for this issue, apply only one of the below
Update node_modules\react-native\scripts\launchPackager.bat file.
@echo off
title Metro Bundler
call .packager.bat

// delete this line
node "%~dp0..\cli.js" start

Add this line
node "%~dp0..\cli.js" start --projectRoot ../../../

pause
exit

We are giving project root path to Metro instance here,
Or in<EMAIL_ADDRESS>edit this,
const procConfig = {

    // delete this line
    cwd: scriptsDir

    // add this line
    cwd: process.cwd()
};

We launched Metro launcher with working directory to our project root

The only way to run vanilla app is to update above workaround from our savior @nazreinkaram . Or, initiate using EXPO.

This worked for me even after upgrading to 0.59.2.  Seems like a big issue with RN still

Metro server instance here is started by runAndroid.js if you ask for react-native run-android
I can help you with android only, I am giving you fix on windows, if you are on Linux then I am sure you definitely know how to apply these fixes on your machine.
Problem is with Working Directory, Metro instance is launched with wrong working directory and no project root is passed in launchPackager
Threre are two fixes for this issue, apply only one of the below
Update node_modules\react-native\scripts\launchPackager.bat file.
@echo off
title Metro Bundler
call .packager.bat

// delete this line
node "%~dp0..\cli.js" start

Add this line
node "%~dp0..\cli.js" start --projectRoot ../../../

pause
exit

We are giving project root path to Metro instance here,
Or in<EMAIL_ADDRESS>edit this,
const procConfig = {

    // delete this line
    cwd: scriptsDir

    // add this line
    cwd: process.cwd()
};

We launched Metro launcher with working directory to our project root

The only way to run vanilla app is to update above workaround from our savior @nazreinkaram . Or, initiate using EXPO.

This worked for me even after upgrading to 0.59.2. Seems like a big issue with RN still

Did you imply that 0.59.2 still has this issue?

Here is what I did:

Started with 0.59.1
Got the error after adding react-native-maps dependency
Ran the upgrade to 0.59.2 based on the comment that it was fixed
Still got the error
Manually edited the file based on the feedback above: "Add this line - node "%~dp0..\cli.js" start --projectRoot ../../../"
Issue resolved

Haven't tried it with a brand new project, but the upgrade did not fix the error.

Sorry, this is fixed for mac on 0.59.1, but not for windows yet.

For those using patch-package, here some patch-file for having working development environment on Windows:
File patches/react-native+0.59.2.patch:
diff --git a/node_modules/react-native/scripts/launchPackager.bat b/node_modules/react-native/scripts/launchPackager.bat
index d33f31e..377d1f7 100644
--- a/node_modules/react-native/scripts/launchPackager.bat
+++ b/node_modules/react-native/scripts/launchPackager.bat
@@ -6,6 +6,6 @@
 @echo off
 title Metro Bundler
 call .packager.bat
-node "%~dp0..\cli.js" start
+node "%~dp0..\cli.js" --reactNativePath ../ --projectRoot ../../../ start
 pause
 exit

Maybe this is just me, but:
react-native start -- --reset-cache
returns
error Unexpected token <
Also, starting new project using react-native init blablabla and then cd blablabla then react-native run-android gives me the same error.
However, the error went away if I use expo.

you should run it in cmd . Not in  vscode terminal

Created a new project in windows by using version 0.59.2, got the same issue.

Same issue here, when upgrading from 0.59.0 to 0.59.2 (OS: Windows 10, npm: 6.7.0).
The workaround from @nazreinkaram worked for us. More precisely, we have edited<EMAIL_ADDRESS>and replaced
cwd: scriptsDir   with    cwd: process.cwd()
We hadn't reset the cache, deleted node_modules folder or tried anything else before applying this quick fix.
"dependencies": {
"react": "16.8.3",
"react-native": "0.59.2",
"react-native-camera": "^2.1.0",
"react-native-gesture-handler": "^1.1.0",
"react-native-qrcode-svg": "^5.1.2",
"react-native-svg": "^9.3.3",
"react-navigation": "^3.5.1"
},
"devDependencies": {
"@babel/core": "7.4.0",
"@babel/runtime": "7.4.2",
"babel-jest": "24.5.0",
"jest": "24.5.0",
"metro-react-native-babel-preset": "0.53.1",
"react-test-renderer": "16.8.3"
}

Metro server instance here is started by runAndroid.js if you ask for react-native run-android
I can help you with android only, I am giving you fix on windows, if you are on Linux then I am sure you definitely know how to apply these fixes on your machine.
Problem is with Working Directory, Metro instance is launched with wrong working directory and no project root is passed in launchPackager
Threre are two fixes for this issue, apply only one of the below
Update node_modules\react-native\scripts\launchPackager.bat file.
@echo off
title Metro Bundler
call .packager.bat

// delete this line
node "%~dp0..\cli.js" start

Add this line
node "%~dp0..\cli.js" start --projectRoot ../../../

pause
exit

We are giving project root path to Metro instance here,
Or in<EMAIL_ADDRESS>edit this,
const procConfig = {

    // delete this line
    cwd: scriptsDir

    // add this line
    cwd: process.cwd()
};

We launched Metro launcher with working directory to our project root

Thanks a lot. It works for me
Thanks it worked for me as well. But this means for every new project i start, i must make this change to the runAndroid.js

I just only init new project with react-native init myapp and have same issue :|
I think react-native version 0.59 have this problem :|

FYI, was having this issue too after upgrading from 0.57.2 to 0.59.1.  The solution came from @FibreFoX who posted above showing the diff between 0.59.1 and 0.59.2.
Upgrading to 0.59.2 fixed the pathing and metro bundler works correctly once again.
GLORY! (Thank you @FibreFoX)

FYI, was having this issue too after upgrading from 0.57.2 to 0.59.1. The solution came from @FibreFoX who posted above showing the diff between 0.59.1 and 0.59.2.
Upgrading to 0.59.2 fixed the pathing and metro bundler works correctly once again.
GLORY! (Thank you @FibreFoX)

hmm. I tried this yesterday and the issue is still there. Let me run it again later today.

run
react-native start -- --reset-cache
then
react-native run-android in separate command line
works fine for me, maybe just for a temporary solution.
there is another solution from @nazreinkaram by updating launchPackager.bat, no need to open two cmd line. thanks

Works Fine!!!!
Open 3 windows in the folder project.
emulator -no-snapshot -avd Nexus_5X_API_23 (Nexus is my emulator, wait open first to open others)
react-native start -- --reset-cache
react-native run-android
.'.ThankYou.'.

Metro server instance here is started by runAndroid.js if you ask for react-native run-android
I can help you with android only, I am giving you fix on windows, if you are on Linux then I am sure you definitely know how to apply these fixes on your machine.
Problem is with Working Directory, Metro instance is launched with wrong working directory and no project root is passed in launchPackager
Threre are two fixes for this issue, apply only one of the below
Update node_modules\react-native\scripts\launchPackager.bat file.
@echo off
title Metro Bundler
call .packager.bat

// delete this line
node "%~dp0..\cli.js" start

Add this line
node "%~dp0..\cli.js" start --projectRoot ../../../

pause
exit

We are giving project root path to Metro instance here,
Or in<EMAIL_ADDRESS>edit this,
const procConfig = {

    // delete this line
    cwd: scriptsDir

    // add this line
    cwd: process.cwd()
};

We launched Metro launcher with working directory to our project root

Thanks so much, been fighting this for some hours

Just Run With 'react-native start' In a Command line & run 'react-native run-android' in a another new command line .Then It will Work Fine.
@this error is happening for directory problem in nodemodules/react-native/script....

Metro server instance here is started by runAndroid.js if you ask for react-native run-android
I can help you with android only, I am giving you fix on windows, if you are on Linux then I am sure you definitely know how to apply these fixes on your machine.
Problem is with Working Directory, Metro instance is launched with wrong working directory and no project root is passed in launchPackager
Threre are two fixes for this issue, apply only one of the below
Update node_modules\react-native\scripts\launchPackager.bat file.
@echo off
title Metro Bundler
call .packager.bat

:: delete this line
node "%~dp0..\cli.js" start

:: Add this line
node "%~dp0..\cli.js" start --projectRoot ../../../

pause
exit

We are giving project root path to Metro instance here,
Or in<EMAIL_ADDRESS>edit this,
const procConfig = {

    // delete this line
    cwd: scriptsDir

    // add this line
    cwd: process.cwd()
};

We launched Metro launcher with working directory to our project root

it works for me thanks

react-native info

info
React Native Environment Info:
System:
OS: Windows 10
CPU: (4) x64 Intel(R) Core(TM) i3-5005U CPU @ 2.00GHz
Memory: 608.47 MB / 3.90 GB
Binaries:
Yarn: 1.12.1 - C:\Program Files (x86)\Yarn\bin\yarn.CMD
npm: 6.7.0 - C:\Program Files\nodejs\npm.CMD
IDEs:
Android Studio: Version  <IP_ADDRESS> AI-173.4720617

If you are running by command prompt on Windows, make sure that you are running as Administrator

i can confirm this works and fixes the issue
run
react-native start -- --reset-cache
then
react-native run-android in separate command line

I have same issue , When I upgrade to 0.59.2 , I must always put --reset-cache to start package

Updated status as of now, Using the  newest version 0.59, I am able to fire up new vanillla project without error.

I got this problem few days ago. today after erasing node_modules it get back
I have metro.config.js as posted above
i tried :

in react-native\scripts\launchPackager.bat
// delete this line
// node "%~dp0..\cli.js" start
// Add this line
node "%~dp0..\cli.js" start --projectRoot ../../../

I give me this error now :
error: bundling failed: Error: Unable to resolve module `./utils/batch`
from `...node_modules\react-redux\lib\index.js`:
 The module `./utils/batch` could not be found from `...node_modules\react-redux\lib\index.js`.
 Indeed, none of these files exist:

"react-native": "0.59.2"
"react": "16.8.6"
"react-redux" : "6.0.1"

@alainib update to latest version

@alainib update to latest version

i tried ( falled completly )
"react": "16.8.6",	"react-native": "0.59.5",         "react-redux" : "7.0.2"
https://i.ibb.co/3dHLtzp/Screenshot-2019-04-26-09-48-24.png

it finally worked thank you

delete node_modules folder

package.json  : "react": "16.8.3", "react-native": "0.59.2", "react-redux": "6.0.1"

npm install

live the node_modules\react-native\scripts\launchPackager.bat as it with node "%~dp0..\cli.js" start

change  @react-native-community\cli\build\commands\runAndroid\runAndroid.js  :
const procConfig = {   cwd: process.cwd()   }

npm cache clean --force

npm start --clear-cache

react-native start --reset-cache
AND THIS STEP I DIDNT DONE BEFORE

delete C:\Users\YOURUSERNAME\AppData\Local\Temp\metro-cache

Thanks, @Souradeep-16

Just Run With 'react-native start' In a Command line & run 'react-native run-android' in another new command line .Then It will Work Fine.
@this error is happening for directory problem in nodemodules/react-native/script....

Metro server instance here is started by runAndroid.js if you ask for react-native run-android
I can help you with android only, I am giving you fix on windows, if you are on Linux then I am sure you definitely know how to apply these fixes on your machine.
Problem is with Working Directory, Metro instance is launched with wrong working directory and no project root is passed in launchPackager
Threre are two fixes for this issue, apply only one of the below
Update node_modules\react-native\scripts\launchPackager.bat file.
@echo off
title Metro Bundler
call .packager.bat

// delete this line
node "%~dp0..\cli.js" start

Add this line
node "%~dp0..\cli.js" start --projectRoot ../../../

pause
exit

We are giving project root path to Metro instance here,
Or in<EMAIL_ADDRESS>edit this,
const procConfig = {

    // delete this line
    cwd: scriptsDir

    // add this line
    cwd: process.cwd()
};

We launched Metro launcher with working directory to our project root

The only way to run vanilla app is to update above workaround from our savior @nazreinkaram . Or, initiate using EXPO.

This worked for me even after upgrading to 0.59.2. Seems like a big issue with RN still

This worked for me for 0.59.0. However, is this fixed in a higher version of RN.

Metro server instance here is started by runAndroid.js if you ask for react-native run-android
I can help you with android only, I am giving you fix on windows, if you are on Linux then I am sure you definitely know how to apply these fixes on your machine.
Problem is with Working Directory, Metro instance is launched with wrong working directory and no project root is passed in launchPackager
Threre are two fixes for this issue, apply only one of the below
Update node_modules\react-native\scripts\launchPackager.bat file.
@echo off
title Metro Bundler
call .packager.bat

// delete this line
node "%~dp0..\cli.js" start

Add this line
node "%~dp0..\cli.js" start --projectRoot ../../../

pause
exit

We are giving project root path to Metro instance here,
Or in<EMAIL_ADDRESS>edit this,
const procConfig = {

    // delete this line
    cwd: scriptsDir

    // add this line
    cwd: process.cwd()
};

We launched Metro launcher with working directory to our project root

The only way to run vanilla app is to update above workaround from our savior @nazreinkaram . Or, initiate using EXPO.

This worked for me even after upgrading to 0.59.2. Seems like a big issue with RN still

This worked for me for 0.59.0. However, is this fixed in a higher version of RN.
I tried upgrading to 0.59.0 faced the same issue, later tried upgrading to 0.59.9 solved this issue.

Using latest 0.59.10 - fresh project - moving App.js, app.json and index.js into a src folder.  Setting projectRoot as src is ignored.

it looks it is permanently broken, only thing that temproray works is this https://github.com/facebook/react-native/issues/23908#issuecomment-473596547
i dont know how the error happened, i had some errors with iOS pods first, then i ran yarn install and also npm install (maybe mistake to run both but probably its not the reason), i even deleted problematic folder in ios pods, didnt help, then i ran lot of commands like rm -rf node_modules, npm install etc nothing helped then the error as stated by the thread starter happened. so something somewhere is still broken.

Those steps except the last 2 fix the issue that arise after I installed exios lib.

radlew clean on android (cd android ; ./gradlew clean ; cd .. )

remove pods folder on ios and install again (cd ios ; pod install ; cd .. )

I thing from RN version 0.59.0 you have to manually start the server
that is
run react-native start
And then open another terminal and then run
react-native run-android
previous version automatically starts the development server. But I think there is a change from RN 0.59.0 upwards.
The above was what worked for me

same issues
Error: Unable to resolve module ./index from \node_modules\react-native\scripts/.: The module ./indexcould not be found from\node_modules\react-native\scripts/.`
React Native Environment Info:
System:
OS: Windows 10
CPU: (4) x64 Intel(R) Core(TM) i3-3110M CPU @ 2.40GHz
Memory: 569.59 MB / 3.89 GB
Binaries:
Yarn: 1.12.3 - C:\Users\Vivek\AppData\Roaming\npm\yarn.CMD
npm: 6.4.1 - C:\Program Files\nodejs\npm.CMD
IDEs:
Android Studio: Version <IP_ADDRESS> AI-182.5<IP_ADDRESS>14842
Environment :
"react": "16.8.3",
"react-moment": "^0.8.4"

Hey, were you able to solve it?  That file does indeed exist!
Since my React Native test runner is nested inside an examples directory of the main module repo. I have a .watchmanconfig with the following.
{
    "ignore_dirs": [
        ".git",
        "node_modules",
        "examples"
    ]
}

If you follow the recommendation to watchman watch-del and watchman watch-project, you'll pickup the .watchmanconfig which stops watching examples, etc. If you watch your nested project to run again, just don't do the watch-project command after watch-deling.
I don't know if this causes other problems, but this is how I got my project working again:
watchman watch-del /Users/username/code/project/react-native-video/examples/MyExampleProject and that's it! Don't watchman watch-project.

I updated to this
"metro-react-native-babel-preset": "0.54.1"

And started workinng again.

Just Run With 'react-native start' In a Command line & run 'react-native run-android' in a another new command line .Then It will Work Fine.
@this error is happening for directory problem in nodemodules/react-native/script....

So basically, debugging an RN app now is even more painful than it already was?

For some reason, none of these worked for me.
At the brinks of madness, I just created an index.android.js file at the root of my folder and it started to work again
Hoping to find a better solution...

I had put my hook useDispatch outside of my function component... maybe it can help someone

For some reason, none of these worked for me.
At the brink of insanity, I just created an index.android.js file at the root of my folder and it started to work again
Hoping to find a better solution...

Was only getting this issue on android, I had changed my entry file in app/build.gradle suspected that might be it. Added an index.android.js to my root and imported my actual files (./src) and it works.
System:
OS: Windows 10 10.0.18363
CPU: (16) x64 AMD Ryzen 7 3700X 8-Core Processor
Memory: 16.09 GB / 31.95 GB
Binaries:
Node: 12.16.1 - C:\Users\ryoid\scoop\apps\nvm\current\nodejs\nodejs\node.EXE
Yarn: 1.22.0 - C:\Users\ryoid\scoop\apps\nvm\current\nodejs\nodejs\yarn.CMD
npm: 6.13.4 - C:\Users\ryoid\scoop\apps\nvm\current\nodejs\nodejs\npm.CMD
SDKs:
Android SDK:
API Levels: 28, 29
Build Tools: 28.0.3, 29.0.2
System Images: android-25 | Google APIs Intel x86 Atom, android-29 | Google APIs Intel x86 Atom
npmPackages:
react: 16.9.0 => 16.9.0
react-native: 0.61.5 => 0.61.5


Fix resource view name collision

Fix ImGui name collision that merged pop-up menus for resources/folder with the same name, even if in different parts of the resource tree.
Fixes #742

SonarQube analysis reported 1 issue
Note: The following issues were found on lines that were not modified in the pull request. Because these issues can't be reported as line comments, they are summarized here:

 AncientFungus:LGEPR: Cppcheck cannot find all the include files (use --check-config for details)