static Future<void> updateBalanceAmount(
{int amount, String balanceId, String userId}) {
var updateBalance = _db
.document('account/$userId/balance/$balanceId')
.updateData({'balance_amount': amount});
return updateBalance;
}
static Future<void> addCreditAmount(
{int amount, String balanceId, String userId}) async {
final DocumentReference ref = _db.document('account/$userId/balance/$balanceId');
await ref.updateData(<String, dynamic> {
'balance_amount': FieldValue.increment(amount),
});
}
Can someone explain why the top function works while the bottom function crashes? Specifically, I need to implement FieldValue.increment in Flutter but it consistently crashes when I try.
Here is the stack trace:
/libc (18226): Fatal signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x8 in tid 18285 (1.raster), pid 18226 (app.matto.com)
Build fingerprint: 'google/sdk_gphone_x86_arm/generic_x86_arm:11/RSR1.200819.001.A1/6823625:userdebug/dev-keys'
Revision: '0'
ABI: 'x86'
Timestamp: 2021-02-18 10:11:50-0500
pid: 18226, tid: 18285, name: 1.raster >>> app.matto.com <<<
uid: 10153
signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x8
Cause: null pointer dereference
eax 00000000 ebx c33c4920 ecx fffffff9 edx 00000000
edi 00000004 esi 00000000
ebp c158a648 esp c158a648 eip c2d12de5
backtrace:
#00 pc 013cbde5 /data/app/~~qml9am1bePmidpLuDa7Bmg==/app.matto.com-mJtCM3HEUFtPk_pMu3CaCA==/lib/x86/libflutter.so (BuildId: 1c148fb28fc7334c78622f67843cff2825d62c72)
#01 pc 013e4673 /data/app/~~qml9am1bePmidpLuDa7Bmg==/app.matto.com-mJtCM3HEUFtPk_pMu3CaCA==/lib/x86/libflutter.so (BuildId: 1c148fb28fc7334c78622f67843cff2825d62c72)
#02 pc 0146c58e /data/app/~~qml9am1bePmidpLuDa7Bmg==/app.matto.com-mJtCM3HEUFtPk_pMu3CaCA==/lib/x86/libflutter.so (BuildId: 1c148fb28fc7334c78622f67843cff2825d62c72)
#03 pc 0163fad3 /data/app/~~qml9am1bePmidpLuDa7Bmg==/app.matto.com-mJtCM3HEUFtPk_pMu3CaCA==/lib/x86/libflutter.so (BuildId: 1c148fb28fc7334c78622f67843cff2825d62c72)
#04 pc 0163f9a5 /data/app/~~qml9am1bePmidpLuDa7Bmg==/app.matto.com-mJtCM3HEUFtPk_pMu3CaCA==/lib/x86/libflutter.so (BuildId: 1c148fb28fc7334c78622f67843cff2825d62c72)
#05 pc 0163fe93 /data/app/~~qml9am1bePmidpLuDa7Bmg==/app.matto.com-mJtCM3HEUFtPk_pMu3CaCA==/lib/x86/libflutter.so (BuildId: 1c148fb28fc7334c78622f67843cff2825d62c72)
#06 pc 0163fc7f /data/app/~~qml9am1bePmidpLuDa7Bmg==/app.matto.com-mJtCM3HEUFtPk_pMu3CaCA==/lib/x86/libflutter.so (BuildId: 1c148fb28fc7334c78622f67843cff2825d62c72)
#07 pc 011f53b5 /data/app/~~qml9am1bePmidpLuDa7Bmg==/app.matto.com-mJtCM3HEUFtPk_pMu3CaCA==/lib/x86/libflutter.so (BuildId: 1c148fb28fc7334c78622f67843cff2825d62c72)
#08 pc 011f600a /data/app/~~qml9am1bePmidpLuDa7Bmg==/app.matto.com-mJtCM3HEUFtPk_pMu3CaCA==/lib/x86/libflutter.so (BuildId: 1c148fb28fc7334c78622f67843cff2825d62c72)
#09 pc 011f6e32 /data/app/~~qml9am1bePmidpLuDa7Bmg==/app.matto.com-mJtCM3HEUFtPk_pMu3CaCA==/lib/x86/libflutter.so (BuildId: 1c148fb28fc7334c78622f67843cff2825d62c72)
#10 pc 011a3f9b /data/app/~~qml9am1bePmidpLuDa7Bmg==/app.matto.com-mJtCM3HEUFtPk_pMu3CaCA==/lib/x86/libflutter.so (BuildId: 1c148fb28fc7334c78622f67843cff2825d62c72)
#11 pc 011f58e4 /data/app/~~qml9am1bePmidpLuDa7Bmg==/app.matto.com-mJtCM3HEUFtPk_pMu3CaCA==/lib/x86/libflutter.so (BuildId: 1c148fb28fc7334c78622f67843cff2825d62c72)
#12 pc 011f564c /data/app/~~qml9am1bePmidpLuDa7Bmg==/app.matto.com-mJtCM3HEUFtPk_pMu3CaCA==/lib/x86/libflutter.so (BuildId: 1c148fb28fc7334c78622f67843cff2825d62c72)
#13 pc 0120376f /data/app/~~qml9am1bePmidpLuDa7Bmg==/app.matto.com-mJtCM3HEUFtPk_pMu3CaCA==/lib/x86/libflutter.so (BuildId: 1c148fb28fc7334c78622f67843cff2825d62c72)
#14 pc 011aa38f /data/app/~~qml9am1bePmidpLuDa7Bmg==/app.matto.com-mJtCM3HEUFtPk_pMu3CaCA==/lib/x86/libflutter.so (BuildId: 1c148fb28fc7334c78622f67843cff2825d62c72)
#15 pc 011acee5 /data/app/~~qml9am1bePmidpLuDa7Bmg==/app.matto.com-mJtCM3HEUFtPk_pMu3CaCA==/lib/x86/libflutter.so (BuildId: 1c148fb28fc7334c78622f67843cff2825d62c72)
#16 pc 011acdf6 /data/app/~~qml9am1bePmidpLuDa7Bmg==/app.matto.com-mJtCM3HEUFtPk_pMu3CaCA==/lib/x86/libflutter.so (BuildId: 1c148fb28fc7334c78622f67843cff2825d62c72)
#17 pc 011b357e /data/app/~~qml9am1bePmidpLuDa7Bmg==/app.matto.com-mJtCM3HEUFtPk_pMu3CaCA==/lib/x86/libflutter.so (BuildId: 1c148fb28fc7334c78622f67843cff2825d62c72)
#18 pc 011b35ac /data/app/~~qml9am1bePmidpLuDa7Bmg==/app.matto.com-mJtCM3HEUFtPk_pMu3CaCA==/lib/x86/libflutter.so (BuildId: 1c148fb28fc7334c78622f67843cff2825d62c72)
#19 pc 00019337 /system/lib/libutils.so (android::SimpleLooperCallback::handleEvent(int, int, void*)+39) (BuildId: ab4be013cda31e8c45d48aa23a89d0f8)
#20 pc 0001a367 /system/lib/libutils.so (android::Looper::pollInner(int)+1127) (BuildId: ab4be013cda31e8c45d48aa23a89d0f8)
#21 pc 00019e96 /system/lib/libutils.so (android::Looper::pollOnce(int, int*, int*, void**)+118) (BuildId: ab4be013cda31e8c45d48aa23a89d0f8)
#22 pc 000133f5 /system/lib/libandroid.so (ALooper_pollOnce+101) (BuildId: f98006d4d736575082b552ff24b66f6c)
#23 pc 011b34bb /data/app/~~qml9am1bePmidpLuDa7Bmg==/app.matto.com-mJtCM3HEUFtPk_pMu3CaCA==/lib/x86/libflutter.so (BuildId: 1c148fb28fc7334c78622f67843cff2825d62c72)
#24 pc 011acda4 /data/app/~~qml9am1bePmidpLuDa7Bmg==/app.matto.com-mJtCM3HEUFtPk_pMu3CaCA==/lib/x86/libflutter.so (BuildId: 1c148fb28fc7334c78622f67843cff2825d62c72)
#25 pc 011ac8fc /data/app/~~qml9am1bePmidpLuDa7Bmg==/app.matto.com-mJtCM3HEUFtPk_pMu3CaCA==/lib/x86/libflutter.so (BuildId: 1c148fb28fc7334c78622f67843cff2825d62c72)
#26 pc 011b0a2d /data/app/~~qml9am1bePmidpLuDa7Bmg==/app.matto.com-mJtCM3HEUFtPk_pMu3CaCA==/lib/x86/libflutter.so (BuildId: 1c148fb28fc7334c78622f67843cff2825d62c72)
#27 pc 000e6964 /apex/com.android.runtime/lib/bionic/libc.so (__pthread_start(void*)+100) (BuildId: a690ed60a8b6a282b41dd991389b5fdb)
#28 pc 00078567 /apex/com.android.runtime/lib/bionic/libc.so (__start_thread+71) (BuildId: a690ed60a8b6a282b41dd991389b5fdb)
Related
I am experiencing a significant increase in crashes on Android 10 devices
Here's a sample crash log
backtrace:
#00 pc 0x000000000013181c /apex/com.android.runtime/lib64/libart.so (mterp_op_invoke_virtual+28)
#01 pc 0x00000000001edc88 /data/data/com.dubox.drive/files/audience_network.dex (com.facebook.ads.redexgen.X.Hg.A00+28)
#02 pc 0x000000000059cdfc /apex/com.android.runtime/lib64/libart.so (MterpInvokeDirect+1168)
#03 pc 0x0000000000131914 /apex/com.android.runtime/lib64/libart.so (mterp_op_invoke_direct+20)
#04 pc 0x00000000001ede16 /data/data/com.dubox.drive/files/audience_network.dex (com.facebook.ads.redexgen.X.Hg.A01+310)
#05 pc 0x000000000059cdfc /apex/com.android.runtime/lib64/libart.so (MterpInvokeDirect+1168)
#06 pc 0x0000000000131914 /apex/com.android.runtime/lib64/libart.so (mterp_op_invoke_direct+20)
#07 pc 0x00000000001eeaf4 /data/data/com.dubox.drive/files/audience_network.dex (com.facebook.ads.redexgen.X.Hg.A0J+284)
#08 pc 0x000000000059aa6c /apex/com.android.runtime/lib64/libart.so (MterpInvokeVirtual+1432)
#09 pc 0x0000000000131814 /apex/com.android.runtime/lib64/libart.so (mterp_op_invoke_virtual+20)
#10 pc 0x00000000001ef364 /data/data/com.dubox.drive/files/audience_network.dex (com.facebook.ads.redexgen.X.Hn.A00+40)
#11 pc 0x000000000059cdfc /apex/com.android.runtime/lib64/libart.so (MterpInvokeDirect+1168)
#12 pc 0x0000000000131914 /apex/com.android.runtime/lib64/libart.so (mterp_op_invoke_direct+20)
#13 pc 0x00000000001ef626 /data/data/com.dubox.drive/files/audience_network.dex (com.facebook.ads.redexgen.X.Hn.doInBackground+22)
#14 pc 0x00000000002b174c /apex/com.android.runtime/lib64/libart.so (art::interpreter::Execute(art::Thread*, art::CodeItemDataAccessor const&, art::ShadowFrame&, art::JValue, bool, bool) (.llvm.7142318256121416140)+240)
#15 pc 0x000000000058bd64 /apex/com.android.runtime/lib64/libart.so (artQuickToInterpreterBridge+1012)
#16 pc 0x0000000000140468 /apex/com.android.runtime/lib64/libart.so (art_quick_to_interpreter_bridge+88)
#17 pc 0x000000000080260c /system/framework/arm64/boot-framework.oat (android.os.AsyncTask$3.call+172)
#18 pc 0x0000000000298d08 /system/framework/arm64/boot.oat (java.util.concurrent.FutureTask.run+200)
#19 pc 0x00000000002fa878 /system/framework/arm64/boot.oat (java.util.concurrent.ThreadPoolExecutor.runWorker+984)
#20 pc 0x00000000002f7ee0 /system/framework/arm64/boot.oat (java.util.concurrent.ThreadPoolExecutor$Worker.run+64)
#21 pc 0x00000000001a5568 /system/framework/arm64/boot.oat (java.lang.Thread.run+72)
#22 pc 0x0000000000137334 /apex/com.android.runtime/lib64/libart.so (art_quick_invoke_stub+548)
#23 pc 0x000000000014606c /apex/com.android.runtime/lib64/libart.so (art::ArtMethod::Invoke(art::Thread*, unsigned int*, unsigned int, art::JValue*, char const*)+244)
#24 pc 0x00000000004abd54 /apex/com.android.runtime/lib64/libart.so (art::(anonymous namespace)::InvokeWithArgArray(art::ScopedObjectAccessAlreadyRunnable const&, art::ArtMethod*, art::(anonymous namespace)::ArgArray*, art::JValue*, char const*)+104)
#25 pc 0x00000000004acde8 /apex/com.android.runtime/lib64/libart.so (art::InvokeVirtualOrInterfaceWithJValues(art::ScopedObjectAccessAlreadyRunnable const&, _jobject*, _jmethodID*, jvalue const*)+416)
#26 pc 0x00000000004ed17c /apex/com.android.runtime/lib64/libart.so (art::Thread::CreateCallback(void*)+1176)
#27 pc 0x00000000000e28c0 /apex/com.android.runtime/lib64/bionic/libc.so (__pthread_start(void*)+36)
#28 pc 0x000000000008503c /apex/com.android.runtime/lib64/bionic/libc.so (__start_thread+64)
Audience Network 6.11.0
the same as audience_network.dex com.facebook.ads.redexgen.X.89.A0E - Crashes on Android 10 after adding Meta Audience Network mediation adapter
I had the same problem, the reason is that the advertising sdk is initialized by multiple processes.
I got this error in a Symfony custom console command:
ErrorException: Warning: ini_set(): Headers already sent. You cannot change the session module's ini settings at this time in <PROJECT_DIR>/backend/vendor/symfony/http-foundation/Session/Storage/Handler/NativeFile
The error was generated by a Doctrine ORM query and the problem is repeatable.
First things first, I suggested to update Symfony from 4.4.2 version to 4.4.20, but it doesn't seem doable in the short term.
I found this issue on Symfony project's git:
https://github.com/symfony/symfony/issues/29605
but I cannot find a doctrine listener in my code that use SessionInterface, so I'm in a dead end.
Do you have any ideas how I can fix this console command without rewrite all from scratch?
This is the stacktrace:
ErrorException: Warning: ini_set(): Headers already sent. You cannot change the session module's ini settings at this time in <PROJECT_DIR>/backend/vendor/symfony/http-foundation/Session/Storage/Handler/NativeFile
SessionHandler.php:52 Stack trace:
#0 <PROJECT_DIR>/backend/var/cache/prod/Container0iTkVVw/srcApp_KernelProdDebugContainer.php(1367): Symfony\Component\HttpFoundation\Session\Storage\Handler\NativeFileSessionHandler->__construct('<PROJECT_DIR>...')
#1 <PROJECT_DIR>/backend/var/cache/prod/Container0iTkVVw/srcApp_KernelProdDebugContainer.php(1823): Container0iTkVVw\srcApp_KernelProdDebugContainer->getSessionService()
#2 <PROJECT_DIR>/backend/vendor/symfony/dependency-injection/Container.php(444): Container0iTkVVw\srcApp_KernelProdDebugContainer->getApp_Context_ListenerService()
#3 <PROJECT_DIR>/backend/vendor/symfony/dependency-injection/Argument/ServiceLocator.php(40): Symfony\Component\DependencyInjection\Container->getService('privates', 'app.context.lis...', 'getApp_Context_...', false)
#4 <PROJECT_DIR>/backend/vendor/symfony/doctrine-bridge/ContainerAwareEventManager.php(136): Symfony\Component\DependencyInjection\Argument\ServiceLocator->get('app.context.lis...')
#5 <PROJECT_DIR>/backend/vendor/symfony/doctrine-bridge/ContainerAwareEventManager.php(74): Symfony\Bridge\Doctrine\ContainerAwareEventManager->initializeListeners('prePersist')
#6 <PROJECT_DIR>/backend/vendor/gedmo/doctrine-extensions/lib/Gedmo/SoftDeleteable/Filter/SoftDeleteableFilter.php(95): Symfony\Bridge\Doctrine\ContainerAwareEventManager->getListeners()
#7 <PROJECT_DIR>/backend/vendor/gedmo/doctrine-extensions/lib/Gedmo/SoftDeleteable/Filter/SoftDeleteableFilter.php(51): Gedmo\SoftDeleteable\Filter\SoftDeleteableFilter->getListener()
#8 <PROJECT_DIR>/backend/vendor/doctrine/orm/lib/Doctrine/ORM/Query/SqlWalker.php(508): Gedmo\SoftDeleteable\Filter\SoftDeleteableFilter->addFilterConstraint(Object(Doctrine\ORM\Mapping\ClassMetadata), 'm0_')
#9 <PROJECT_DIR>/backend/vendor/doctrine/orm/lib/Doctrine/ORM/Query/SqlWalker.php(1786): Doctrine\ORM\Query\SqlWalker->generateFilterConditionSQL(Object(Doctrine\ORM\Mapping\ClassMetadata), 'm0_')
#10 <PROJECT_DIR>/backend/vendor/doctrine/orm/lib/Doctrine/ORM/Query/SqlWalker.php(526): Doctrine\ORM\Query\SqlWalker->walkWhereClause(Object(Doctrine\ORM\Query\AST\WhereClause))
#11 <PROJECT_DIR>/backend/vendor/doctrine/orm/lib/Doctrine/ORM/Query/Exec/SingleSelectExecutor.php(42): Doctrine\ORM\Query\SqlWalker->walkSelectStatement(Object(Doctrine\ORM\Query\AST\SelectStatement))
#12 <PROJECT_DIR>/backend/vendor/doctrine/orm/lib/Doctrine/ORM/Query/SqlWalker.php(278): Doctrine\ORM\Query\Exec\SingleSelectExecutor->__construct(Object(Doctrine\ORM\Query\AST\SelectStatement), Object(Doctrine\ORM\Query\SqlWalker))
#13 <PROJECT_DIR>/backend/vendor/doctrine/orm/lib/Doctrine/ORM/Query/Parser.php(399): Doctrine\ORM\Query\SqlWalker->getExecutor(Object(Doctrine\ORM\Query\AST\SelectStatement))
#14 <PROJECT_DIR>/backend/vendor/doctrine/orm/lib/Doctrine/ORM/Query.php(286): Doctrine\ORM\Query\Parser->parse()
#15 <PROJECT_DIR>/backend/vendor/doctrine/orm/lib/Doctrine/ORM/Query.php(298): Doctrine\ORM\Query->_parse()
#16 <PROJECT_DIR>/backend/vendor/doctrine/orm/lib/Doctrine/ORM/AbstractQuery.php(992): Doctrine\ORM\Query->_doExecute()
#17 <PROJECT_DIR>/backend/vendor/doctrine/orm/lib/Doctrine/ORM/AbstractQuery.php(947): Doctrine\ORM\AbstractQuery->executeIgnoreQueryCache(NULL, 1)
#18 <PROJECT_DIR>/backend/vendor/doctrine/orm/lib/Doctrine/ORM/AbstractQuery.php(750): Doctrine\ORM\AbstractQuery->execute(NULL, 1)
#19 <PROJECT_DIR>/backend/src/Repository/MemberRepository.php(320): Doctrine\ORM\AbstractQuery->getResult()
#20 <PROJECT_DIR>/backend/src/Services/SyncActiveCampaignManager.php(604): App\Repository\MemberRepository->findByExtactFiscalCode('XXXXXXXXXXXXXXX...')
#21 <PROJECT_DIR>/backend/src/Services/SyncActiveCampaignManager.php(565): App\Services\SyncActiveCampaignManager->syncSingleACContacts(Array, Array)
#22 <PROJECT_DIR>/backend/src/Command/SyncActiveCampaignCommand.php(118): App\Services\SyncActiveCampaignManager->syncExistingACContacts(Array, Array, 10)
#23 <PROJECT_DIR>/backend/vendor/symfony/console/Command/Command.php (251): App\Command\SyncActiveCampaignCommand->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#24 <PROJECT_DIR>/backend/vendor/symfony/console/Application.php(904): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#25 <PROJECT_DIR>/backend/vendor/symfony/framework-bundle/Console/Application.php(89): Symfony\Component\Console\Application->doRunCommand(Object(App\Command\SyncActiveCampaignCommand), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#26 <PROJECT_DIR>/backend/vendor/symfony/console/Application.php(262): Symfony\Bundle\FrameworkBundle\Console\Application->doRunCommand(Object(App\Command\SyncActiveCampaignCommand), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#27 <PROJECT_DIR>/backend/vendor/symfony/framework-bundle/Console/Application.php(75): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#28 <PROJECT_DIR>/backend/vendor/symfony/console/Application.php(145): Symfony\Bundle\FrameworkBundle\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#29 <PROJECT_DIR>/backend/bin/console(39): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput))
#30 {main} [] []
I'm using this:
Future<Object> get(String endpoint) async {
var httpClientRequest = await httpClient.getUrl(Uri.parse(_url + endpoint));
_addCookies(httpClientRequest);
final httpClientResponse = await httpClientRequest.close();
return httpClientResponse
.transform(utf8.decoder)
.transform(json.decoder)
.first;
}
from here https://stackoverflow.com/a/60344779/10116440
to get a json from my API. But I get
Unhandled exception:
FormatException: Unexpected character (at character 1)
<!DOCTYPE html>
^
#0 _ChunkedJsonParser.fail (dart:convert-patch/convert_patch.dart:1394:5)
#1 _ChunkedJsonParser.parseNumber (dart:convert-patch/convert_patch.dart:1261:9)
#2 _ChunkedJsonParser.parse (dart:convert-patch/convert_patch.dart:926:22)
#3 _JsonStringDecoderSink.addSlice (dart:convert-patch/convert_patch.dart:1480:13)
#4 _JsonStringDecoderSink.add (dart:convert-patch/convert_patch.dart:1485:5)
#5 _ConverterStreamEventSink.add (dart:convert/chunked_conversion.dart:74:18)
#6 _SinkTransformerStreamSubscription._handleData (dart:async/stream_transformers.dart:122:24)
#7 _RootZone.runUnaryGuarded (dart:async/zone.dart:1316:10)
#8 _BufferingStreamSubscription._sendData (dart:async/stream_impl.dart:338:11)
#9 _BufferingStreamSubscription._add (dart:async/stream_impl.dart:265:7)
#10 _SinkTransformerStreamSubscription._add (dart:async/stream_transformers.dart:70:11)
#11 _EventSinkWrapper.add (dart:async/stream_transformers.dart:17:11)
#12 _StringAdapterSink.add (dart:convert/string_conversion.dart:238:11)
#13 _StringAdapterSink.addSlice (dart:convert/string_conversion.dart:243:7)
#14 _Utf8ConversionSink.addSlice (dart:convert/string_conversion.dart:314:20)
#15 _Utf8ConversionSink.add (dart:convert/string_conversion.dart:307:5)
#16 _ConverterStreamEventSink.add (dart:convert/chunked_conversion.dart:74:18)
#17 _SinkTransformerStreamSubscription._handleData (dart:async/stream_transformers.dart:122:24)
#18 _RootZone.runUnaryGuarded (dart:async/zone.dart:1316:10)
#19 _BufferingStreamSubscription._sendData (dart:async/stream_impl.dart:338:11)
#20 _BufferingStreamSubscription._add (dart:async/stream_impl.dart:265:7)
#21 _ForwardingStreamSubscription._add (dart:async/stream_pipe.dart:134:11)
#22 _ForwardingStream._handleData (dart:async/stream_pipe.dart:100:10)
#23 _ForwardingStreamSubscription._handleData (dart:async/stream_pipe.dart:166:13)
#24 _RootZone.runUnaryGuarded (dart:async/zone.dart:1316:10)
#25 _BufferingStreamSubscription._sendData (dart:async/stream_impl.dart:338:11)
#26 _DelayedData.perform (dart:async/stream_impl.dart:593:14)
#27 _StreamImplEvents.handleNext (dart:async/stream_impl.dart:709:11)
#28 _PendingEvents.schedule.<anonymous closure> (dart:async/stream_impl.dart:669:7)
#29 _microtaskLoop (dart:async/schedule_microtask.dart:43:21)
#30 _startMicrotaskLoop (dart:async/schedule_microtask.dart:52:5)
#31 _runPendingImmediateCallback (dart:isolate-patch/isolate_patch.dart:118:13)
#32 _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:175:5)
but I'm positive that the API returns json, not HTML.
What is going on? My API doesn't even return HTML, how can it complain that there's a doctype?
By default, most web app servers reply with various HTML pages when an error occurs (404 not found, 401 not authorized, 500 internal exception etc.)
Try checking the HTTP status code of the response instead of assuming it's always a successful JSON response. If the status code is not 200, it may not be a JSON.
I have just installed a fresh copy of WordPress on a Google GCP App Engine STANDARD environment following these steps: https://cloud.google.com/community/tutorials/run-wordpress-on-appengine-standard
The last step is pretty unclear or uncomplete. I have create the bucket (GCP Storage), installed the GCS official plugin (0.1.5) but when I upload some images on media folder i have this error:
Fatal error: Uncaught GuzzleHttp\Exception\ClientException: Client error: `GET https://www.googleapis.com/storage/v1/b/xxx-news.appspot.com/o/1%2F2019%2F11` resulted in a `404 Not Found` response: { "error": { "code": 404, "message": "No such object: xxx-news.appspot.com/1/2019/11", "errors": [ (truncated...) in /srv/wp-content/plugins/gcs/vendor/guzzlehttp/guzzle/src/Exception/RequestException.php:113 Stack trace: #0 /srv/wp-content/plugins/gcs/vendor/guzzlehttp/guzzle/src/Middleware.php(66): GuzzleHttp\Exception\RequestException::create(Object(GuzzleHttp\Psr7\Request), Object(GuzzleHttp\Psr7\Response)) #1 /srv/wp-content/plugins/gcs/vendor/guzzlehttp/promises/src/Promise.php(203): GuzzleHttp\Middleware::GuzzleHttp\{closure}(Object(GuzzleHttp\Psr7\Response)) #2 /srv/wp-content/plugins/gcs/vendor/guzzlehttp/promises/src/Promise.php(156): GuzzleHttp\Promise\Promise::callHandler(1, Object(GuzzleHttp\Psr7\Response), Array) #3 /srv/wp-content/plugins/gcs/vendor/guzzlehttp/promises/src/TaskQueue.php(47): GuzzleHttp\Promise\Promise::GuzzleHttp\Promise\{closure}() #4 /srv/wp-content/plugins/gcs/vendor/guzzlehttp/promises/src/Promise.php(246): GuzzleHttp\Promise\TaskQueue->run(true) #5 /srv/wp-content/plugins/gcs/vendor/guzzlehttp/promises/src/Promise.php(223): GuzzleHttp\Promise\Promise->invokeWaitFn() #6 /srv/wp-content/plugins/gcs/vendor/guzzlehttp/promises/src/Promise.php(267): GuzzleHttp\Promise\Promise->waitIfPending() #7 /srv/wp-content/plugins/gcs/vendor/guzzlehttp/promises/src/Promise.php(225): GuzzleHttp\Promise\Promise->invokeWaitList() #8 /srv/wp-content/plugins/gcs/vendor/guzzlehttp/promises/src/Promise.php(62): GuzzleHttp\Promise\Promise->waitIfPending() #9 /srv/wp-content/plugins/gcs/vendor/guzzlehttp/guzzle/src/Client.php(106): GuzzleHttp\Promise\Promise->wait() #10 /srv/wp-content/plugins/gcs/vendor/google/auth/src/HttpHandler/Guzzle6HttpHandler.php(34): GuzzleHttp\Client->send(Object(GuzzleHttp\Psr7\Request), Array) #11 [internal function]: Google\Auth\HttpHandler\Guzzle6HttpHandler->__invoke(Object(GuzzleHttp\Psr7\Request), Array) #12 /srv/wp-content/plugins/gcs/gcs.php(134): call_user_func_array(Object(Google\Auth\HttpHandler\Guzzle6HttpHandler), Array) #13 [internal function]: Google\Cloud\Storage\WordPress\{closure}(Object(GuzzleHttp\Psr7\Request), Array) #14 /srv/wp-content/plugins/gcs/vendor/google/cloud-core/src/ExponentialBackoff.php(74): call_user_func_array(Object(Closure), Array) #15 /srv/wp-content/plugins/gcs/vendor/google/cloud-core/src/RequestWrapper.php(166): Google\Cloud\Core\ExponentialBackoff->execute(Object(Closure), Array) #16 /srv/wp-content/plugins/gcs/vendor/google/cloud-core/src/RestTrait.php(95): Google\Cloud\Core\RequestWrapper->send(Object(GuzzleHttp\Psr7\Request), Array) #17 /srv/wp-content/plugins/gcs/vendor/google/cloud-storage/src/Connection/Rest.php(195): Google\Cloud\Storage\Connection\Rest->send('objects', 'get', Array) #18 /srv/wp-content/plugins/gcs/vendor/google/cloud-storage/src/StorageObject.php(1123): Google\Cloud\Storage\Connection\Rest->getObject(Array) #19 /srv/wp-content/plugins/gcs/vendor/google/cloud-storage/src/StorageObject.php(1074): Google\Cloud\Storage\StorageObject->reload(Array) #20 /srv/wp-content/plugins/gcs/vendor/google/cloud-storage/src/StreamWrapper.php(583): Google\Cloud\Storage\StorageObject->info() #21 /srv/wp-content/plugins/gcs/vendor/google/cloud-storage/src/StreamWrapper.php(488): Google\Cloud\Storage\StreamWrapper->urlStatFile() #22 [internal function]: Google\Cloud\Storage\StreamWrapper->url_stat('gs://xxx-news....', 2) #23 /srv/wp-includes/functions.php(1922): file_exists('gs://xxx-news....') #24 /srv/wp-includes/functions.php(2254): wp_mkdir_p('gs://xxx-news....') #25 /srv/wp-admin/includes/file.php(837): wp_upload_dir('2019-11-20 11:1...') #26 /srv/wp-admin/includes/file.php(953): _wp_handle_upload(Array, Array, '2019-11-20 11:1...', 'wp_handle_uploa...') #27 /srv/wp-admin/includes/media.php(301): wp_handle_upload(Array, Array, '2019-11-20 11:1...') #28 /srv/wp-admin/async-upload.php(93): media_handle_upload('async-upload', 0) #29 /srv/gae-app.php(53): require('/srv/wp-admin/a...') #30 {main} thrown in /srv/wp-content/plugins/gcs/vendor/guzzlehttp/guzzle/src/Exception/RequestException.php on line 113
I suppose i'm missing something on my ACL permission but i don't have idea how to proceed
Thanks!
GCS 0.1.5 present bugs on media loading
I have used instead 0.1.4
https://github.com/GoogleCloudPlatform/wordpress-plugins/issues/68
When donging Bluetooth low energy development, doing stress test to connect one central device (phone) with one peripheral device (smart device), found bluedroid crashed in GATT main function with log as below:
08-04 11:26:44.915 4155 4190 F libc : Fatal signal 11 (SIGSEGV), code 1, fault addr 0x1000000 in tid 4190 (bluedroid wake/)
08-04 11:26:44.975 2303 2303 I DEBUG : *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
08-04 11:26:44.975 2303 2303 I DEBUG : Build fingerprint:
'marvell/pxa1908FF_tz/pxa1908FF:5.1.1/LMY47V/buildfarm06230955:userdebug/test-keys'
08-04 11:26:44.975 2303 2303 I DEBUG : Revision: '0'
08-04 11:26:44.976 2303 2303 I DEBUG : ABI: 'arm'
08-04 11:26:44.976 2303 2303 I DEBUG : pid: 4155, tid: 4190, name: bluedroid wake/ >>> com.android.bluetooth <<<
08-04 11:26:44.976 2303 2303 I DEBUG : signal 11 (SIGSEGV), code 1
(SEGV_MAPERR), fault addr 0x1000000
08-04 11:26:44.994 2303 2303 I DEBUG : r0 00000001 r1 52aa2c60 r2 00000000 r3 00000001
08-04 11:26:44.994 2303 2303 I DEBUG : r4 00000005 r5 4ac2b734 r6 01000000 r7 00000002
08-04 11:26:44.994 2303 2303 I DEBUG : r8 00000000 r9 00000000 sl 00000013 fp 00000000
08-04 11:26:44.994 2303 2303 I DEBUG : ip 52aa2ba0 sp 52aa2c60 lr 4aacd6c7 pc 01000000 cpsr 600f0010
08-04 11:26:44.995 2303 2303 I DEBUG :
08-04 11:26:44.995 2303 2303 I DEBUG : backtrace:
08-04 11:26:44.995 2303 2303 I DEBUG : #00 pc 01000000 <unknown>
08-04 11:26:44.995 2303 2303 I DEBUG : #01 pc 000c66c5
/system/lib/hw/bluetooth.default.so (gatt_add_a_bonded_dev_for_srv_chg+140)
08-04 11:26:44.995 2303 2303 I DEBUG : #02 pc 000c6e87
/system/lib/hw/bluetooth.default.so
08-04 11:26:44.995 2303 2303 I DEBUG : #03 pc 000d9c3b /system/lib/hw/bluetooth.default.so (l2cu_release_lcb+230)
08-04 11:26:44.996 2303 2303 I DEBUG : #04 pc 000dbbab /system/lib/hw/bluetooth.default.so (l2c_link_hci_disc_comp+254)
08-04 11:26:44.996 2303 2303 I DEBUG : #05 pc 000d40df /system/lib/hw/bluetooth.default.so (btu_hcif_process_event+738)
08-04 11:26:44.996 2303 2303 I DEBUG : #06 pc 000d4ea3 /system/lib/hw/bluetooth.default.so (btu_task+226)
08-04 11:26:44.996 2303 2303 I DEBUG : #07 pc 000a4129 /system/lib/hw/bluetooth.default.so
08-04 11:26:44.996 2303 2303 I DEBUG : #08 pc 00016abf /system/lib/libc.so (__pthread_start(void*)+30)
08-04 11:26:44.997 2303 2303 I DEBUG : #09 pc 000149eb /system/lib/libc.so (__start_thread+6)
08-04 11:26:45.833 2303 2303 I DEBUG :
08-04 11:26:45.833 2303 2303 I DEBUG : Tombstone written to: /data/tombstones/tombstone_06
08-04 11:26:45.834 2786 2808 I BootReceiver: Copying
/data/tombstones/tombstone_06 to DropBox (SYSTEM_TOMBSTONE)
08-04 11:26:45.859 4323 4323 I dumpstate: begin
08-04 11:26:45.838 0 0 E kernel : [ 246.972663] c1 4323 (dumpstate) android: (08-04 11:26:45) process pid: 4155, tid: 4190 crash!
Code (gatt_main.c):
void gatt_add_a_bonded_dev_for_srv_chg (BD_ADDR bda)
{
tGATTS_SRV_CHG *p_buf;
tGATTS_SRV_CHG_REQ req;
tGATTS_SRV_CHG srv_chg_clt;
memcpy(srv_chg_clt.bda, bda, BD_ADDR_LEN);
srv_chg_clt.srv_changed = FALSE;
if (gatt_add_srv_chg_clt(&srv_chg_clt) != NULL)
{
memcpy(req.srv_chg.bda, bda, BD_ADDR_LEN);
req.srv_chg.srv_changed = FALSE;
if (gatt_cb.cb_info.p_srv_chg_callback)
{
GATT_TRACE_ERROR("==========abcd xman debug========");
(*gatt_cb.cb_info.p_srv_chg_callback)(GATTS_SRV_CHG_CMD_ADD_CLIENT, &req, NULL);
}
}
}
Did somebody found the similar issue before?
Or if someone give advance?
This test is under android lp5.1.