From 2d807d474d68f38d181593db1b353c87fecd8227 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Eduardo=20G=C3=B3mez=20Benavides?= Date: Wed, 16 Aug 2023 17:08:41 -0600 Subject: [PATCH 1/4] Removed override for CDMX --- src/Server.js | 18 ++---------------- 1 file changed, 2 insertions(+), 16 deletions(-) diff --git a/src/Server.js b/src/Server.js index c2f16e9cc..46671ae28 100644 --- a/src/Server.js +++ b/src/Server.js @@ -47,20 +47,6 @@ const save = data => { }) } -function overrideCity(values) { - - return values.map((value) => { - if (value.city.startsWith('Ciudad de México')) { - return { - ...value, - city: 'Ciudad de México', - } - } - - return value - }) -} - class Server { static loadAll() { @@ -74,11 +60,11 @@ class Server { if (!remoteData) { - return resolve(overrideCity(localData)) + return resolve(localData) } save(remoteData) - .then(() => resolve(overrideCity(remoteData))) + .then(() => resolve(remoteData)) }) }) From ca6d66da7afadcc07a5595c8dc494730c69abd10 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Eduardo=20G=C3=B3mez=20Benavides?= Date: Wed, 18 Oct 2023 17:02:11 -0600 Subject: [PATCH 2/4] check servers before constructing selection list --- android/hs_err_pid10404.log | 220 ++++++++++++++++++++++++++++++++++++ src/API.js | 9 +- src/Server.js | 67 ++++++++++- src/redux/App/actions.js | 4 +- 4 files changed, 289 insertions(+), 11 deletions(-) create mode 100644 android/hs_err_pid10404.log diff --git a/android/hs_err_pid10404.log b/android/hs_err_pid10404.log new file mode 100644 index 000000000..3bdf2bb3e --- /dev/null +++ b/android/hs_err_pid10404.log @@ -0,0 +1,220 @@ +# +# There is insufficient memory for the Java Runtime Environment to continue. +# Native memory allocation (mmap) failed to map 67108864 bytes for G1 virtual space +# Possible reasons: +# The system is out of physical RAM or swap space +# The process is running with CompressedOops enabled, and the Java Heap may be blocking the growth of the native heap +# Possible solutions: +# Reduce memory load on the system +# Increase physical memory or swap space +# Check if swap backing store is full +# Decrease Java heap size (-Xmx/-Xms) +# Decrease number of Java threads +# Decrease Java thread stack sizes (-Xss) +# Set larger code cache with -XX:ReservedCodeCacheSize= +# JVM is running with Unscaled Compressed Oops mode in which the Java heap is +# placed in the first 4GB address space. The Java Heap base address is the +# maximum limit for the native heap growth. Please use -XX:HeapBaseMinAddress +# to set the Java Heap base and to place the Java Heap above 4GB virtual address. +# This output file may be truncated or incomplete. +# +# Out of Memory Error (os_windows.cpp:3550), pid=10404, tid=15848 +# +# JRE version: (17.0.6+9) (build ) +# Java VM: Java HotSpot(TM) 64-Bit Server VM (17.0.6+9-LTS-190, mixed mode, sharing, tiered, compressed oops, compressed class ptrs, g1 gc, windows-amd64) +# No core dump will be written. Minidumps are not enabled by default on client versions of Windows +# + +--------------- S U M M A R Y ------------ + +Command Line: -Xmx64m -Xms64m -Dorg.gradle.appname=gradlew org.gradle.wrapper.GradleWrapperMain app:installOfficialDebug -PreactNativeDevServerPort=8081 + +Host: AMD Ryzen 7 PRO 4750G with Radeon Graphics, 16 cores, 35G, Windows 10 , 64 bit Build 19041 (10.0.19041.3570) +Time: Wed Oct 18 12:19:51 2023 Hora estndar central (Mxico) elapsed time: 0.075120 seconds (0d 0h 0m 0s) + +--------------- T H R E A D --------------- + +Current thread (0x000002259ad1e670): JavaThread "Unknown thread" [_thread_in_vm, id=15848, stack(0x000000819ad00000,0x000000819ae00000)] + +Stack: [0x000000819ad00000,0x000000819ae00000] +Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code) +V [jvm.dll+0x6734ea] +V [jvm.dll+0x7d18f4] +V [jvm.dll+0x7d309e] +V [jvm.dll+0x7d3703] +V [jvm.dll+0x2433c5] +V [jvm.dll+0x6703f9] +V [jvm.dll+0x664d32] +V [jvm.dll+0x300086] +V [jvm.dll+0x307606] +V [jvm.dll+0x356c1e] +V [jvm.dll+0x356e4f] +V [jvm.dll+0x2d72e8] +V [jvm.dll+0x2d8254] +V [jvm.dll+0x7a33b1] +V [jvm.dll+0x3647f1] +V [jvm.dll+0x782839] +V [jvm.dll+0x3e757f] +V [jvm.dll+0x3e9001] +C [jli.dll+0x5297] +C [ucrtbase.dll+0x21bb2] +C [KERNEL32.DLL+0x17344] +C [ntdll.dll+0x526b1] + + +--------------- P R O C E S S --------------- + +Threads class SMR info: +_java_thread_list=0x00007ffd09abe958, length=0, elements={ +} + +Java Threads: ( => current thread ) + +Other Threads: + 0x000002259ad3ef60 GCTaskThread "GC Thread#0" [stack: 0x000000819ae00000,0x000000819af00000] [id=22584] + 0x000002259ad406a0 ConcurrentGCThread "G1 Main Marker" [stack: 0x000000819af00000,0x000000819b000000] [id=29604] + 0x000002259ad420c0 ConcurrentGCThread "G1 Conc#0" [stack: 0x000000819b000000,0x000000819b100000] [id=11080] + +[error occurred during error reporting (printing all threads), id 0xc0000005, EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x00007ffd092f7f07] + +VM state: not at safepoint (not fully initialized) + +VM Mutex/Monitor currently owned by a thread: ([mutex/lock_event]) +[0x000002259ad1ae60] Heap_lock - owner thread: 0x000002259ad1e670 + +Heap address: 0x00000000fc000000, size: 64 MB, Compressed Oops mode: 32-bit + +CDS archive(s) mapped at: [0x0000000000000000-0x0000000000000000-0x0000000000000000), size 0, SharedBaseAddress: 0x0000000800000000, ArchiveRelocationMode: 0. +Narrow klass base: 0x0000000000000000, Narrow klass shift: 0, Narrow klass range: 0x0 + +GC Precious Log: + + +Heap: + garbage-first heap total 0K, used 0K [0x00000000fc000000, 0x0000000100000000) + region size 1024K, 0 young (0K), 0 survivors (0K) + +[error occurred during error reporting (printing heap information), id 0xc0000005, EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x00007ffd096dc759] + +GC Heap History (0 events): +No events + +Deoptimization events (0 events): +No events + +Classes unloaded (0 events): +No events + +Classes redefined (0 events): +No events + +Internal exceptions (0 events): +No events + +VM Operations (0 events): +No events + +Events (1 events): +Event: 0.061 Loaded shared library C:\Program Files\Java\jdk-17\bin\java.dll + + +Dynamic libraries: +0x00007ff763d00000 - 0x00007ff763d10000 C:\Program Files\Java\jdk-17\bin\java.exe +0x00007ffd9bdd0000 - 0x00007ffd9bfc7000 C:\Windows\SYSTEM32\ntdll.dll +0x00007ffd9bc00000 - 0x00007ffd9bcbd000 C:\Windows\System32\KERNEL32.DLL +0x00007ffd994b0000 - 0x00007ffd997a6000 C:\Windows\System32\KERNELBASE.dll +0x00007ffd99910000 - 0x00007ffd99a10000 C:\Windows\System32\ucrtbase.dll +0x00007ffd7c7c0000 - 0x00007ffd7c7d8000 C:\Program Files\Java\jdk-17\bin\jli.dll +0x00007ffd9a400000 - 0x00007ffd9a4ae000 C:\Windows\System32\ADVAPI32.dll +0x00007ffd9bac0000 - 0x00007ffd9bb5e000 C:\Windows\System32\msvcrt.dll +0x00007ffd9bb60000 - 0x00007ffd9bbfc000 C:\Windows\System32\sechost.dll +0x00007ffd9b3b0000 - 0x00007ffd9b4d6000 C:\Windows\System32\RPCRT4.dll +0x00007ffd9b210000 - 0x00007ffd9b3ae000 C:\Windows\System32\USER32.dll +0x00007ffd99c50000 - 0x00007ffd99c72000 C:\Windows\System32\win32u.dll +0x00007ffd9bd60000 - 0x00007ffd9bd8c000 C:\Windows\System32\GDI32.dll +0x00007ffd99d10000 - 0x00007ffd99e2a000 C:\Windows\System32\gdi32full.dll +0x00007ffd99b40000 - 0x00007ffd99bdd000 C:\Windows\System32\msvcp_win.dll +0x00007ffd84f30000 - 0x00007ffd84f4b000 C:\Program Files\Java\jdk-17\bin\VCRUNTIME140.dll +0x00007ffd81090000 - 0x00007ffd8132a000 C:\Windows\WinSxS\amd64_microsoft.windows.common-controls_6595b64144ccf1df_6.0.19041.3570_none_60bb2a3971f3e41a\COMCTL32.dll +0x00007ffd8e720000 - 0x00007ffd8e72a000 C:\Windows\SYSTEM32\VERSION.dll +0x00007ffd9bd30000 - 0x00007ffd9bd60000 C:\Windows\System32\IMM32.DLL +0x00007ffd94190000 - 0x00007ffd9419c000 C:\Program Files\Java\jdk-17\bin\vcruntime140_1.dll +0x00007ffd4b4f0000 - 0x00007ffd4b57e000 C:\Program Files\Java\jdk-17\bin\msvcp140.dll +0x00007ffd09010000 - 0x00007ffd09be7000 C:\Program Files\Java\jdk-17\bin\server\jvm.dll +0x00007ffd9adb0000 - 0x00007ffd9adb8000 C:\Windows\System32\PSAPI.DLL +0x00007ffd81070000 - 0x00007ffd81079000 C:\Windows\SYSTEM32\WSOCK32.dll +0x00007ffd9bcc0000 - 0x00007ffd9bd2b000 C:\Windows\System32\WS2_32.dll +0x00007ffd8e6f0000 - 0x00007ffd8e717000 C:\Windows\SYSTEM32\WINMM.dll +0x00007ffd97240000 - 0x00007ffd97252000 C:\Windows\SYSTEM32\kernel.appcore.dll +0x00007ffd8c300000 - 0x00007ffd8c30a000 C:\Program Files\Java\jdk-17\bin\jimage.dll +0x00007ffd903b0000 - 0x00007ffd90594000 C:\Windows\SYSTEM32\DBGHELP.DLL +0x00007ffd8ac50000 - 0x00007ffd8ac84000 C:\Windows\SYSTEM32\dbgcore.DLL +0x00007ffd99c80000 - 0x00007ffd99d02000 C:\Windows\System32\bcryptPrimitives.dll +0x00007ffd6e7e0000 - 0x00007ffd6e805000 C:\Program Files\Java\jdk-17\bin\java.dll + +dbghelp: loaded successfully - version: 4.0.5 - missing functions: none +symbol engine: initialized successfully - sym options: 0x614 - pdb path: .;C:/Program Files/qBittorrent;C:\Program Files\Java\jdk-17\bin;C:\Windows\SYSTEM32;C:\Windows\WinSxS\amd64_microsoft.windows.common-controls_6595b64144ccf1df_6.0.19041.3570_none_60bb2a3971f3e41a;C:\Program Files\Java\jdk-17\bin\server + +VM Arguments: +jvm_args: -Xmx64m -Xms64m -Dorg.gradle.appname=gradlew +java_command: org.gradle.wrapper.GradleWrapperMain app:installOfficialDebug -PreactNativeDevServerPort=8081 +java_class_path (initial): I:\coopcycle-app\android\\gradle\wrapper\gradle-wrapper.jar +Launcher Type: SUN_STANDARD + +[Global flags] + intx CICompilerCount = 12 {product} {ergonomic} + uint ConcGCThreads = 3 {product} {ergonomic} + uint G1ConcRefinementThreads = 13 {product} {ergonomic} + size_t G1HeapRegionSize = 1048576 {product} {ergonomic} + uintx GCDrainStackTargetSize = 64 {product} {ergonomic} + size_t InitialHeapSize = 67108864 {product} {command line} + size_t MarkStackSize = 4194304 {product} {ergonomic} + size_t MaxHeapSize = 67108864 {product} {command line} + size_t MinHeapDeltaBytes = 1048576 {product} {ergonomic} + size_t MinHeapSize = 67108864 {product} {command line} + uintx NonNMethodCodeHeapSize = 7602480 {pd product} {ergonomic} + uintx NonProfiledCodeHeapSize = 122027880 {pd product} {ergonomic} + uintx ProfiledCodeHeapSize = 122027880 {pd product} {ergonomic} + uintx ReservedCodeCacheSize = 251658240 {pd product} {ergonomic} + bool SegmentedCodeCache = true {product} {ergonomic} + size_t SoftMaxHeapSize = 67108864 {manageable} {ergonomic} + bool UseCompressedClassPointers = true {product lp64_product} {ergonomic} + bool UseCompressedOops = true {product lp64_product} {ergonomic} + bool UseG1GC = true {product} {ergonomic} + bool UseLargePagesIndividualAllocation = false {pd product} {ergonomic} + +Logging: +Log output configuration: + #0: stdout all=warning uptime,level,tags + #1: stderr all=off uptime,level,tags + +Environment Variables: +JAVA_HOME=C:\Program Files\Java\jdk-17 +CLASSPATH=I:\coopcycle-app\android\\gradle\wrapper\gradle-wrapper.jar +PATH=I:\coopcycle-app\android\node_modules\.bin;I:\coopcycle-app\node_modules\.bin;I:\node_modules\.bin;C:\Users\gromi\AppData\Roaming\npm\node_modules\node\bin;C:\Users\gromi\AppData\Local\Temp\yarn--1697653163811-0.5452404282433372;I:\coopcycle-app\node_modules\.bin;C:\Users\gromi\AppData\Local\Yarn\Data\link\node_modules\.bin;C:\Users\gromi\AppData\Local\Yarn\bin;C:\Users\gromi\AppData\Roaming\npm\node_modules\node\libexec\lib\node_modules\npm\bin\node-gyp-bin;C:\Users\gromi\AppData\Roaming\npm\node_modules\node\lib\node_modules\npm\bin\node-gyp-bin;C:\Users\gromi\AppData\Roaming\npm\node_modules\node\bin\node_modules\npm\bin\node-gyp-bin;C:\Users\gromi\.nvm\versions\node\v17.9.1\bin;C:\Users\gromi\.platformsh\bin;C:\Users\gromi\bin;C:\Program Files\Git\mingw64\bin;C:\Program Files\Git\usr\local\bin;C:\Program Files\Git\usr\bin;C:\Program Files\Git\usr\bin;C:\Program Files\Git\mingw64\bin;C:\Program Files\Git\usr\bin;C:\Users\gromi\bin;C:\Program Files\Google\Chrome\Application;C:\Program Files (x86)\VMware\VMware Player\bin;C:\Python311\Scripts;C:\Python311;C:\Program Files\Common Files\Oracle\Java\javapath;C:\Program Files (x86)\Common Files\Oracle\Java\javapath;C:\Program Files\Microsoft MPI\Bin;C:\Users\gromi\AppData\Local\Programs\Python\Python39\Scripts;C:\Users\gromi\AppData\Local\Programs\Python\Python39;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0;C:\Windows\System32\OpenSSH;C:\ProgramData\ComposerSetup\bin;C:\ProgramData\chocolatey\bin;C:\Program Files (x86)\WinSCP;E:\Android_SDK\platform-tools;C:\Program Files (x86)\Microsoft SQL Server\150\DTS\Binn;C:\Program Files\Azure Data Studio\bin;C:\Program Files (x86)\Microsoft SQL Server\150\Tools\Binn;C:\Program Files\Microsoft SQL Server\150\Tools\Binn;C:\Program Files\Microsoft SQL Server\150\DTS\Binn;C:\Program Files\Microsoft SQL Server\Client SDK\ODBC\170\Tools\Binn;C:\Program Files\dotnet;C:\wamp64\bin\mysql\mysql5.7.31\bin;C:\Program Files\PuTTY;C:\Pr +USERNAME=gromi +SHELL=C:\Program Files\Git\usr\bin\bash.exe +DISPLAY=needs-to-be-defined +LANG=en_US.UTF-8 +OS=Windows_NT +PROCESSOR_IDENTIFIER=AMD64 Family 23 Model 96 Stepping 1, AuthenticAMD + + + +--------------- S Y S T E M --------------- + +OS: + Windows 10 , 64 bit Build 19041 (10.0.19041.3570) +OS uptime: 5 days 16:17 hours +Hyper-V role detected + +CPU: total 16 (initial active 16) (16 cores per cpu, 2 threads per core) family 23 model 96 stepping 1 microcode 0x0, cx8, cmov, fxsr, ht, mmx, 3dnowpref, sse, sse2, sse3, ssse3, sse4a, sse4.1, sse4.2, popcnt, lzcnt, tsc, tscinvbit, avx, avx2, aes, clmul, bmi1, bmi2, adx, sha, fma, vzeroupper, clflush, clflushopt, hv + +Memory: 4k page, system-wide physical 36756M (8194M free) +TotalPageFile size 52772M (AvailPageFile size 27M) +current process WorkingSet (physical memory assigned to process): 10M, peak: 10M +current process commit charge ("private bytes"): 69M, peak: 133M + +vm_info: Java HotSpot(TM) 64-Bit Server VM (17.0.6+9-LTS-190) for windows-amd64 JRE (17.0.6+9-LTS-190), built on Dec 6 2022 15:53:54 by "mach5one" with MS VC++ 17.1 (VS2022) + +END. diff --git a/src/API.js b/src/API.js index 326ec0f4b..3c652ad43 100644 --- a/src/API.js +++ b/src/API.js @@ -695,13 +695,13 @@ const createError = function(code) { } } -const checkServer = function(server) { +const checkServer = function(server, quick) { return new Promise((resolve, reject) => { resolveBaseURL(server) .then((baseURL) => { - - console.log('Base URL is ' + baseURL) - + if (quick == true) { + resolve(baseURL); + } axios .get(`${baseURL}/api`, { headers: { @@ -731,6 +731,7 @@ const checkServer = function(server) { .catch(error => { if (error.response) { if (error.response.status === 503) { + console.log(baseURL + ' is under maintenace'); reject(createError(ERROR_MAINTENANCE_ON)) } else { reject(createError(ERROR_NOT_COMPATIBLE)) diff --git a/src/Server.js b/src/Server.js index 46671ae28..bc6f98529 100644 --- a/src/Server.js +++ b/src/Server.js @@ -1,5 +1,6 @@ import AsyncStorage from '@react-native-async-storage/async-storage' import axios from 'axios' +import API from './API' const load = () => { @@ -8,10 +9,8 @@ const load = () => { AsyncStorage.getItem('@CoopCycle.servers') .then((data, e) => { if (e || !data) { - return resolve([]) } - resolve(JSON.parse(data)) }) } catch (e) { @@ -47,6 +46,64 @@ const save = data => { }) } + +async function overrideCity(values) { + console.log(values.length) + const fail = Symbol() + /* + values = + (await Promise.all( + values.map( + async value => ( + await + API.checkServer(value.url, true) + ) + .then((response) => { + console.log(response) + return value}).catch((err) => { + console.log(fail) + return fail}) + ) + )).filter(i => i !== fail) + +p.then(value => { + console.log(value); +}).catch(err => { + console.log(err); // 👉️ "Something went wrong" +}); + + */ + + const promises = values.map(async(n) => ({ + value: n, + include: await API.checkServer(n.url, true).then(value => { + console.log(value); + return true; + }).catch(err => { + console.log(err); // 👉️ "Something went wrong" + return false; + }) + })); + const data_with_includes = await Promise.all(promises); + console.log(data_with_includes); + const filtered_data_with_includes = data_with_includes.filter(v => v.include); + const filtered_data = filtered_data_with_includes.map(data => data.value); + console.log(filtered_data.length); + console.log(values.length) + values = filtered_data; + return values.map((value) => { + + if (value.city.startsWith('Ciudad de México')) { + return { + ...value, + city: 'Ciudad de México', + } + } + + return value + }) +} + class Server { static loadAll() { @@ -60,11 +117,11 @@ class Server { if (!remoteData) { - return resolve(localData) + return resolve(overrideCity(localData)) } save(remoteData) - .then(() => resolve(remoteData)) + .then(() => resolve(overrideCity(remoteData))) }) }) @@ -72,4 +129,4 @@ class Server { } -export default Server +export default Server \ No newline at end of file diff --git a/src/redux/App/actions.js b/src/redux/App/actions.js index 2ebfa30ad..14bbac37c 100644 --- a/src/redux/App/actions.js +++ b/src/redux/App/actions.js @@ -287,13 +287,13 @@ function loadAll(getState) { } export function selectServer(server) { - + console.log('selected server: ' + server); return function (dispatch, getState) { dispatch(setLoading(true)) dispatch(_clearSelectServerError()) - return API.checkServer(server) + return API.checkServer(server, false) .then(baseURL => Settings.synchronize(baseURL) .then((settings) => { From 189002e0ff9072f7a8b03ff3b894d6e7bb5d922b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Eduardo=20G=C3=B3mez=20Benavides?= Date: Wed, 18 Oct 2023 17:05:00 -0600 Subject: [PATCH 3/4] removed log --- android/hs_err_pid10404.log | 220 ------------------------------------ 1 file changed, 220 deletions(-) delete mode 100644 android/hs_err_pid10404.log diff --git a/android/hs_err_pid10404.log b/android/hs_err_pid10404.log deleted file mode 100644 index 3bdf2bb3e..000000000 --- a/android/hs_err_pid10404.log +++ /dev/null @@ -1,220 +0,0 @@ -# -# There is insufficient memory for the Java Runtime Environment to continue. -# Native memory allocation (mmap) failed to map 67108864 bytes for G1 virtual space -# Possible reasons: -# The system is out of physical RAM or swap space -# The process is running with CompressedOops enabled, and the Java Heap may be blocking the growth of the native heap -# Possible solutions: -# Reduce memory load on the system -# Increase physical memory or swap space -# Check if swap backing store is full -# Decrease Java heap size (-Xmx/-Xms) -# Decrease number of Java threads -# Decrease Java thread stack sizes (-Xss) -# Set larger code cache with -XX:ReservedCodeCacheSize= -# JVM is running with Unscaled Compressed Oops mode in which the Java heap is -# placed in the first 4GB address space. The Java Heap base address is the -# maximum limit for the native heap growth. Please use -XX:HeapBaseMinAddress -# to set the Java Heap base and to place the Java Heap above 4GB virtual address. -# This output file may be truncated or incomplete. -# -# Out of Memory Error (os_windows.cpp:3550), pid=10404, tid=15848 -# -# JRE version: (17.0.6+9) (build ) -# Java VM: Java HotSpot(TM) 64-Bit Server VM (17.0.6+9-LTS-190, mixed mode, sharing, tiered, compressed oops, compressed class ptrs, g1 gc, windows-amd64) -# No core dump will be written. Minidumps are not enabled by default on client versions of Windows -# - ---------------- S U M M A R Y ------------ - -Command Line: -Xmx64m -Xms64m -Dorg.gradle.appname=gradlew org.gradle.wrapper.GradleWrapperMain app:installOfficialDebug -PreactNativeDevServerPort=8081 - -Host: AMD Ryzen 7 PRO 4750G with Radeon Graphics, 16 cores, 35G, Windows 10 , 64 bit Build 19041 (10.0.19041.3570) -Time: Wed Oct 18 12:19:51 2023 Hora estndar central (Mxico) elapsed time: 0.075120 seconds (0d 0h 0m 0s) - ---------------- T H R E A D --------------- - -Current thread (0x000002259ad1e670): JavaThread "Unknown thread" [_thread_in_vm, id=15848, stack(0x000000819ad00000,0x000000819ae00000)] - -Stack: [0x000000819ad00000,0x000000819ae00000] -Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code) -V [jvm.dll+0x6734ea] -V [jvm.dll+0x7d18f4] -V [jvm.dll+0x7d309e] -V [jvm.dll+0x7d3703] -V [jvm.dll+0x2433c5] -V [jvm.dll+0x6703f9] -V [jvm.dll+0x664d32] -V [jvm.dll+0x300086] -V [jvm.dll+0x307606] -V [jvm.dll+0x356c1e] -V [jvm.dll+0x356e4f] -V [jvm.dll+0x2d72e8] -V [jvm.dll+0x2d8254] -V [jvm.dll+0x7a33b1] -V [jvm.dll+0x3647f1] -V [jvm.dll+0x782839] -V [jvm.dll+0x3e757f] -V [jvm.dll+0x3e9001] -C [jli.dll+0x5297] -C [ucrtbase.dll+0x21bb2] -C [KERNEL32.DLL+0x17344] -C [ntdll.dll+0x526b1] - - ---------------- P R O C E S S --------------- - -Threads class SMR info: -_java_thread_list=0x00007ffd09abe958, length=0, elements={ -} - -Java Threads: ( => current thread ) - -Other Threads: - 0x000002259ad3ef60 GCTaskThread "GC Thread#0" [stack: 0x000000819ae00000,0x000000819af00000] [id=22584] - 0x000002259ad406a0 ConcurrentGCThread "G1 Main Marker" [stack: 0x000000819af00000,0x000000819b000000] [id=29604] - 0x000002259ad420c0 ConcurrentGCThread "G1 Conc#0" [stack: 0x000000819b000000,0x000000819b100000] [id=11080] - -[error occurred during error reporting (printing all threads), id 0xc0000005, EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x00007ffd092f7f07] - -VM state: not at safepoint (not fully initialized) - -VM Mutex/Monitor currently owned by a thread: ([mutex/lock_event]) -[0x000002259ad1ae60] Heap_lock - owner thread: 0x000002259ad1e670 - -Heap address: 0x00000000fc000000, size: 64 MB, Compressed Oops mode: 32-bit - -CDS archive(s) mapped at: [0x0000000000000000-0x0000000000000000-0x0000000000000000), size 0, SharedBaseAddress: 0x0000000800000000, ArchiveRelocationMode: 0. -Narrow klass base: 0x0000000000000000, Narrow klass shift: 0, Narrow klass range: 0x0 - -GC Precious Log: - - -Heap: - garbage-first heap total 0K, used 0K [0x00000000fc000000, 0x0000000100000000) - region size 1024K, 0 young (0K), 0 survivors (0K) - -[error occurred during error reporting (printing heap information), id 0xc0000005, EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x00007ffd096dc759] - -GC Heap History (0 events): -No events - -Deoptimization events (0 events): -No events - -Classes unloaded (0 events): -No events - -Classes redefined (0 events): -No events - -Internal exceptions (0 events): -No events - -VM Operations (0 events): -No events - -Events (1 events): -Event: 0.061 Loaded shared library C:\Program Files\Java\jdk-17\bin\java.dll - - -Dynamic libraries: -0x00007ff763d00000 - 0x00007ff763d10000 C:\Program Files\Java\jdk-17\bin\java.exe -0x00007ffd9bdd0000 - 0x00007ffd9bfc7000 C:\Windows\SYSTEM32\ntdll.dll -0x00007ffd9bc00000 - 0x00007ffd9bcbd000 C:\Windows\System32\KERNEL32.DLL -0x00007ffd994b0000 - 0x00007ffd997a6000 C:\Windows\System32\KERNELBASE.dll -0x00007ffd99910000 - 0x00007ffd99a10000 C:\Windows\System32\ucrtbase.dll -0x00007ffd7c7c0000 - 0x00007ffd7c7d8000 C:\Program Files\Java\jdk-17\bin\jli.dll -0x00007ffd9a400000 - 0x00007ffd9a4ae000 C:\Windows\System32\ADVAPI32.dll -0x00007ffd9bac0000 - 0x00007ffd9bb5e000 C:\Windows\System32\msvcrt.dll -0x00007ffd9bb60000 - 0x00007ffd9bbfc000 C:\Windows\System32\sechost.dll -0x00007ffd9b3b0000 - 0x00007ffd9b4d6000 C:\Windows\System32\RPCRT4.dll -0x00007ffd9b210000 - 0x00007ffd9b3ae000 C:\Windows\System32\USER32.dll -0x00007ffd99c50000 - 0x00007ffd99c72000 C:\Windows\System32\win32u.dll -0x00007ffd9bd60000 - 0x00007ffd9bd8c000 C:\Windows\System32\GDI32.dll -0x00007ffd99d10000 - 0x00007ffd99e2a000 C:\Windows\System32\gdi32full.dll -0x00007ffd99b40000 - 0x00007ffd99bdd000 C:\Windows\System32\msvcp_win.dll -0x00007ffd84f30000 - 0x00007ffd84f4b000 C:\Program Files\Java\jdk-17\bin\VCRUNTIME140.dll -0x00007ffd81090000 - 0x00007ffd8132a000 C:\Windows\WinSxS\amd64_microsoft.windows.common-controls_6595b64144ccf1df_6.0.19041.3570_none_60bb2a3971f3e41a\COMCTL32.dll -0x00007ffd8e720000 - 0x00007ffd8e72a000 C:\Windows\SYSTEM32\VERSION.dll -0x00007ffd9bd30000 - 0x00007ffd9bd60000 C:\Windows\System32\IMM32.DLL -0x00007ffd94190000 - 0x00007ffd9419c000 C:\Program Files\Java\jdk-17\bin\vcruntime140_1.dll -0x00007ffd4b4f0000 - 0x00007ffd4b57e000 C:\Program Files\Java\jdk-17\bin\msvcp140.dll -0x00007ffd09010000 - 0x00007ffd09be7000 C:\Program Files\Java\jdk-17\bin\server\jvm.dll -0x00007ffd9adb0000 - 0x00007ffd9adb8000 C:\Windows\System32\PSAPI.DLL -0x00007ffd81070000 - 0x00007ffd81079000 C:\Windows\SYSTEM32\WSOCK32.dll -0x00007ffd9bcc0000 - 0x00007ffd9bd2b000 C:\Windows\System32\WS2_32.dll -0x00007ffd8e6f0000 - 0x00007ffd8e717000 C:\Windows\SYSTEM32\WINMM.dll -0x00007ffd97240000 - 0x00007ffd97252000 C:\Windows\SYSTEM32\kernel.appcore.dll -0x00007ffd8c300000 - 0x00007ffd8c30a000 C:\Program Files\Java\jdk-17\bin\jimage.dll -0x00007ffd903b0000 - 0x00007ffd90594000 C:\Windows\SYSTEM32\DBGHELP.DLL -0x00007ffd8ac50000 - 0x00007ffd8ac84000 C:\Windows\SYSTEM32\dbgcore.DLL -0x00007ffd99c80000 - 0x00007ffd99d02000 C:\Windows\System32\bcryptPrimitives.dll -0x00007ffd6e7e0000 - 0x00007ffd6e805000 C:\Program Files\Java\jdk-17\bin\java.dll - -dbghelp: loaded successfully - version: 4.0.5 - missing functions: none -symbol engine: initialized successfully - sym options: 0x614 - pdb path: .;C:/Program Files/qBittorrent;C:\Program Files\Java\jdk-17\bin;C:\Windows\SYSTEM32;C:\Windows\WinSxS\amd64_microsoft.windows.common-controls_6595b64144ccf1df_6.0.19041.3570_none_60bb2a3971f3e41a;C:\Program Files\Java\jdk-17\bin\server - -VM Arguments: -jvm_args: -Xmx64m -Xms64m -Dorg.gradle.appname=gradlew -java_command: org.gradle.wrapper.GradleWrapperMain app:installOfficialDebug -PreactNativeDevServerPort=8081 -java_class_path (initial): I:\coopcycle-app\android\\gradle\wrapper\gradle-wrapper.jar -Launcher Type: SUN_STANDARD - -[Global flags] - intx CICompilerCount = 12 {product} {ergonomic} - uint ConcGCThreads = 3 {product} {ergonomic} - uint G1ConcRefinementThreads = 13 {product} {ergonomic} - size_t G1HeapRegionSize = 1048576 {product} {ergonomic} - uintx GCDrainStackTargetSize = 64 {product} {ergonomic} - size_t InitialHeapSize = 67108864 {product} {command line} - size_t MarkStackSize = 4194304 {product} {ergonomic} - size_t MaxHeapSize = 67108864 {product} {command line} - size_t MinHeapDeltaBytes = 1048576 {product} {ergonomic} - size_t MinHeapSize = 67108864 {product} {command line} - uintx NonNMethodCodeHeapSize = 7602480 {pd product} {ergonomic} - uintx NonProfiledCodeHeapSize = 122027880 {pd product} {ergonomic} - uintx ProfiledCodeHeapSize = 122027880 {pd product} {ergonomic} - uintx ReservedCodeCacheSize = 251658240 {pd product} {ergonomic} - bool SegmentedCodeCache = true {product} {ergonomic} - size_t SoftMaxHeapSize = 67108864 {manageable} {ergonomic} - bool UseCompressedClassPointers = true {product lp64_product} {ergonomic} - bool UseCompressedOops = true {product lp64_product} {ergonomic} - bool UseG1GC = true {product} {ergonomic} - bool UseLargePagesIndividualAllocation = false {pd product} {ergonomic} - -Logging: -Log output configuration: - #0: stdout all=warning uptime,level,tags - #1: stderr all=off uptime,level,tags - -Environment Variables: -JAVA_HOME=C:\Program Files\Java\jdk-17 -CLASSPATH=I:\coopcycle-app\android\\gradle\wrapper\gradle-wrapper.jar -PATH=I:\coopcycle-app\android\node_modules\.bin;I:\coopcycle-app\node_modules\.bin;I:\node_modules\.bin;C:\Users\gromi\AppData\Roaming\npm\node_modules\node\bin;C:\Users\gromi\AppData\Local\Temp\yarn--1697653163811-0.5452404282433372;I:\coopcycle-app\node_modules\.bin;C:\Users\gromi\AppData\Local\Yarn\Data\link\node_modules\.bin;C:\Users\gromi\AppData\Local\Yarn\bin;C:\Users\gromi\AppData\Roaming\npm\node_modules\node\libexec\lib\node_modules\npm\bin\node-gyp-bin;C:\Users\gromi\AppData\Roaming\npm\node_modules\node\lib\node_modules\npm\bin\node-gyp-bin;C:\Users\gromi\AppData\Roaming\npm\node_modules\node\bin\node_modules\npm\bin\node-gyp-bin;C:\Users\gromi\.nvm\versions\node\v17.9.1\bin;C:\Users\gromi\.platformsh\bin;C:\Users\gromi\bin;C:\Program Files\Git\mingw64\bin;C:\Program Files\Git\usr\local\bin;C:\Program Files\Git\usr\bin;C:\Program Files\Git\usr\bin;C:\Program Files\Git\mingw64\bin;C:\Program Files\Git\usr\bin;C:\Users\gromi\bin;C:\Program Files\Google\Chrome\Application;C:\Program Files (x86)\VMware\VMware Player\bin;C:\Python311\Scripts;C:\Python311;C:\Program Files\Common Files\Oracle\Java\javapath;C:\Program Files (x86)\Common Files\Oracle\Java\javapath;C:\Program Files\Microsoft MPI\Bin;C:\Users\gromi\AppData\Local\Programs\Python\Python39\Scripts;C:\Users\gromi\AppData\Local\Programs\Python\Python39;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0;C:\Windows\System32\OpenSSH;C:\ProgramData\ComposerSetup\bin;C:\ProgramData\chocolatey\bin;C:\Program Files (x86)\WinSCP;E:\Android_SDK\platform-tools;C:\Program Files (x86)\Microsoft SQL Server\150\DTS\Binn;C:\Program Files\Azure Data Studio\bin;C:\Program Files (x86)\Microsoft SQL Server\150\Tools\Binn;C:\Program Files\Microsoft SQL Server\150\Tools\Binn;C:\Program Files\Microsoft SQL Server\150\DTS\Binn;C:\Program Files\Microsoft SQL Server\Client SDK\ODBC\170\Tools\Binn;C:\Program Files\dotnet;C:\wamp64\bin\mysql\mysql5.7.31\bin;C:\Program Files\PuTTY;C:\Pr -USERNAME=gromi -SHELL=C:\Program Files\Git\usr\bin\bash.exe -DISPLAY=needs-to-be-defined -LANG=en_US.UTF-8 -OS=Windows_NT -PROCESSOR_IDENTIFIER=AMD64 Family 23 Model 96 Stepping 1, AuthenticAMD - - - ---------------- S Y S T E M --------------- - -OS: - Windows 10 , 64 bit Build 19041 (10.0.19041.3570) -OS uptime: 5 days 16:17 hours -Hyper-V role detected - -CPU: total 16 (initial active 16) (16 cores per cpu, 2 threads per core) family 23 model 96 stepping 1 microcode 0x0, cx8, cmov, fxsr, ht, mmx, 3dnowpref, sse, sse2, sse3, ssse3, sse4a, sse4.1, sse4.2, popcnt, lzcnt, tsc, tscinvbit, avx, avx2, aes, clmul, bmi1, bmi2, adx, sha, fma, vzeroupper, clflush, clflushopt, hv - -Memory: 4k page, system-wide physical 36756M (8194M free) -TotalPageFile size 52772M (AvailPageFile size 27M) -current process WorkingSet (physical memory assigned to process): 10M, peak: 10M -current process commit charge ("private bytes"): 69M, peak: 133M - -vm_info: Java HotSpot(TM) 64-Bit Server VM (17.0.6+9-LTS-190) for windows-amd64 JRE (17.0.6+9-LTS-190), built on Dec 6 2022 15:53:54 by "mach5one" with MS VC++ 17.1 (VS2022) - -END. From 0be7b7bfbac0a53810be9aefb34e8a095133d7a5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Eduardo=20G=C3=B3mez=20Benavides?= Date: Fri, 17 Nov 2023 17:21:56 -0600 Subject: [PATCH 4/4] cleanup --- src/Server.js | 28 ---------------------------- 1 file changed, 28 deletions(-) diff --git a/src/Server.js b/src/Server.js index bc6f98529..bcd5df3ce 100644 --- a/src/Server.js +++ b/src/Server.js @@ -48,36 +48,11 @@ const save = data => { async function overrideCity(values) { - console.log(values.length) const fail = Symbol() - /* - values = - (await Promise.all( - values.map( - async value => ( - await - API.checkServer(value.url, true) - ) - .then((response) => { - console.log(response) - return value}).catch((err) => { - console.log(fail) - return fail}) - ) - )).filter(i => i !== fail) - -p.then(value => { - console.log(value); -}).catch(err => { - console.log(err); // 👉️ "Something went wrong" -}); - - */ const promises = values.map(async(n) => ({ value: n, include: await API.checkServer(n.url, true).then(value => { - console.log(value); return true; }).catch(err => { console.log(err); // 👉️ "Something went wrong" @@ -85,11 +60,8 @@ p.then(value => { }) })); const data_with_includes = await Promise.all(promises); - console.log(data_with_includes); const filtered_data_with_includes = data_with_includes.filter(v => v.include); const filtered_data = filtered_data_with_includes.map(data => data.value); - console.log(filtered_data.length); - console.log(values.length) values = filtered_data; return values.map((value) => {