Can't execute flutter doctor command in flutter console - error-handling

When I run flutter doctor command in flutter console I'm getting this error. Can someone please help me out. I tried running in C drive used both the combination of Run as Admin (C and D drive)
D:\flutter>flutter doctor
CreateProcessW failed 193
CreateProcessW failed 193
Unhandled exception:
ProcessException: %1 is not a valid Win32 application.
Command: C:\Program Files\Git\cmd\git.EXE rev-parse --abbrev-ref --symbolic #{u}
#0 _ProcessImpl._runAndWait (dart:io-patch/process_patch.dart:485)
#1 _runNonInteractiveProcessSync (dart:io-patch/process_patch.dart:631)
#2 Process.runSync (dart:io-patch/process_patch.dart:66)
#3 LocalProcessManager.runSync (package:process/src/interface/local_process_manager.dart:83)
#4 _runWithLoggingSync (package:flutter_tools/src/base/process.dart:321)
#5 runSync (package:flutter_tools/src/base/process.dart:296)
#6 _runGit (package:flutter_tools/src/version.dart:449)
#7 new FlutterVersion (package:flutter_tools/src/version.dart:23)
#8 runInContext.<anonymous closure> (package:flutter_tools/src/context_runner.dart:64)
#9 AppContext._generateIfNecessary.<anonymous closure> (package:flutter_tools/src/base/context.dart:99)
#10 _HashVMBase&MapMixin&&_LinkedHashMapMixin.putIfAbsent (dart:collection-patch/dart:collection/compact_hash.dart:277)
#11 AppContext._generateIfNecessary (package:flutter_tools/src/base/context.dart:87)
#12 AppContext.[] (package:flutter_tools/src/base/context.dart:114)
#13 FlutterVersion.instance (package:flutter_tools/src/version.dart:170)
#14 new Usage (package:flutter_tools/src/usage.dart:26)
#15 runInContext.<anonymous closure> (package:flutter_tools/src/context_runner.dart:76)
#16 AppContext._generateIfNecessary.<anonymous closure> (package:flutter_tools/src/base/context.dart:99)
#17 _HashVMBase&MapMixin&&_LinkedHashMapMixin.putIfAbsent (dart:collection-patch/dart:collection/compact_hash.dart:277)
#18 AppContext._generateIfNecessary (package:flutter_tools/src/base/context.dart:87)
#19 AppContext.[] (package:flutter_tools/src/base/context.dart:114)
#20 Usage.instance (package:flutter_tools/src/usage.dart:52)
#21 flutterUsage (package:flutter_tools/src/usage.dart:20)
#22 _handleToolError (package:flutter_tools/runner.dart:113)
<asynchronous suspension>
#23 run.<anonymous closure> (package:flutter_tools/runner.dart:63)
<asynchronous suspension>
#24 AppContext.run.<anonymous closure> (package:flutter_tools/src/base/context.dart:142)
<asynchronous suspension>
#25 _rootRun (dart:async/zone.dart:1126)
#26 _CustomZone.run (dart:async/zone.dart:1023)
#27 runZoned (dart:async/zone.dart:1501)
#28 AppContext.run (package:flutter_tools/src/base/context.dart:141)
<asynchronous suspension>
#29 runInContext (package:flutter_tools/src/context_runner.dart:43)
<asynchronous suspension>
#30 run (package:flutter_tools/runner.dart:50)
#31 main (package:flutter_tools/executable.dart:49)
<asynchronous suspension>
#32 main (file:///E:/b/build/slave/Windows_Flutter_Packaging/build/archive/flutter/packages/flutter_tools/bin/flutter_tools.dart:8)
#33 _startIsolate.<anonymous closure> (dart:isolate-patch/dart:isolate/isolate_patch.dart:277)
#34 _RawReceivePortImpl._handleMessage (dart:isolate-patch/dart:isolate/isolate_patch.dart:165)

Try to reinstall git, after that update your path to be able to run flutter from your command prompt.
for more details on how to update your path visit: Update your path

There might be a spacing issue (eg. C:\Users\M Junaid) though flutter now supports spaces but try to move ANDROID SDK into Custom location where there are no spaces (eg. C:\Users\M.Junaid) in location path and update the variable ANDROID_HOME (value should be the same location you had moved it with no spaces).

Go through this tutorial instead. I know it's a pain to watch it entirely but on the other hand you will be able to run a fresh and clean project from scratch.
Flutter tutorial
After that I ended up buying the full course and let me tell you I have not being disappointed.

Related

Cannot access product page in font office - Prestashop 1.7

Not sure what happened, but out of a sudden I am not able access the product page when I click on a product in my prestashop FO.
This is the error I'm getting
Fatal error: Uncaught Exception: CartPresenter can only present instance of Cart in C:\xampp\htdocs\prestashop\src\Adapter\Presenter\Cart\CartPresenter.php:315 Stack trace: #0
C:\xampp\htdocs\prestashop\classes\controller\FrontController.php(501):PrestaShop\PrestaShop\Adapter\Presenter\Cart\CartPresenter->present(NULL) #1
C:\xampp\htdocs\prestashop\classes\controller\FrontController.php(567):FrontControllerCore->assignGeneralPurposeVariables() #2 C:\xampp\htdocs\prestashop\classes\controller\Controller.php(306):FontControllerCore->initContent() #3
C:\xampp\htdocs\prestashop\classes\Dispatcher.php(518): ControllerCore->run() #4
C:\xampp\htdocs\prestashop\index.php(28): DispatcherCore->dispatch() #5
{main} thrown in C:\xampp\htdocs\prestashop\src\Adapter\Presenter\Cart\CartPresenter.php on line 315
I've tried uninstalling and reinstalling the shopping cart module, but nothing changes. I couldn't find any other solutions anywhere for this.
What can I try next?

Fatal error: Uncaught exception 'Adapter_Exception' with message 'Service container is not set.'

I was just upgrading my prestashop store to 1.6.1.5, everything goes fine but when I was installing a module I get this error:
Fatal error: Uncaught exception 'Adapter_Exception' with message
'Service container is not set.' in
/customers/8/c/0/tinplate-models.be/httpd.www/Adapter/Adapter_ServiceLocator.php:49
Stack trace: #0
/customers/8/c/0/tinplate-models.be/httpd.www/classes/ObjectModel.php(232):
Adapter_ServiceLocator::get('Adapter_EntityM...') #1
/customers/8/c/0/tinplate-models.be/httpd.www/classes/shop/Shop.php(131):
ObjectModelCore->__construct('1', NULL, NULL) #2
/customers/8/c/0/tinplate-models.be/httpd.www/classes/shop/Shop.php(400):
ShopCore->__construct('1') #3
/customers/8/c/0/tinplate-models.be/httpd.www/config/config.inc.php(95):
ShopCore::initialize() #4
/customers/8/c/0/tinplate-models.be/httpd.www/index.php(27):
require('/customers/8/c/...') #5 {main} thrown in
/customers/8/c/0/tinplate-models.be/httpd.www/Adapter/Adapter_ServiceLocator.php
on line 49
Hope someone has a solution?
I had the same problem.
Now I found the reason - the method of Adapter_ServiceLocator.php get() using private field $service_container, which should be intalized with method setServiceContainerInstance(). I found the initializing in /config/bootstrap.php. But it wasnt any includes of the file bootstrap.php!
So you should download fresh version of Prestashop and rewrite the /config/config.inc.php.
Because it must contain
require_once $currentDir . DIRECTORY_SEPARATOR . 'bootstrap.php';
I hope it will help

Version 6.0 (6A313) crash when refreshing provisioning profiles

Refreshing provisioning profile in Xcode 6 worked for me for a while and xcode 6 crashes today when I refresh it .
Any one can help?
I saw there is a ticket on stackoverflow and it does not help in my case.
"Xcode crash when refreshing provisioning profiles"
Xcode crash when refreshing provisioning profiles
Thanks in advance.
Process: Xcode [979]
Path: /Applications/Xcode 2.app/Contents/MacOS/Xcode
Identifier: com.apple.dt.Xcode
Version: 6.0 (6299)
Build Info: IDEFrameworks-6299000000000000~8
Code Type: X86-64 (Native)
Parent Process: launchd [357]
Responsible: Xcode [979]
User ID: 501
Date/Time: 2014-11-14 11:14:00.919 -0800
OS Version: Mac OS X 10.9.5 (13F34)
Report Version: 11
Anonymous UUID: 13628E65-2AA7-5BA1-59E1-B82B3CC26059
Crashed Thread: 15 Dispatch queue: NSManagedObjectContext Queue
Exception Type: EXC_CRASH (SIGABRT)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Application Specific Information:
ProductBuildVersion: 6A313
UNCAUGHT EXCEPTION (NSInvalidArgumentException): -[NSNull longLongValue]: unrecognized selector sent to instance 0x7fff7c4ba240
UserInfo: (null)
Hints: None
Backtrace:
0 0x00007fff93a58244 exceptionPreprocess (in CoreFoundation)
1 0x000000010c119184 DVTFailureHintExceptionPreprocessor (in DVTFoundation)
2 0x00007fff963ffe75 objc_exception_throw (in libobjc.A.dylib)
3 0x00007fff93a5b12d -[NSObject(NSObject) doesNotRecognizeSelector:] (in CoreFoundation)
4 0x00007fff939b6272 ___forwarding_ (in CoreFoundation)
5 0x00007fff939b5df8 _CF_forwarding_prep_0 (in CoreFoundation)
6 0x00007fff93eb952b -[NSSQLiteConnection execute] (in CoreData)
7 0x00007fff93ed3fd0 newFetchedRowsForFetchPlan_MT (in CoreData)
8 0x00007fff93ec085f -[NSSQLCore objectsForFetchRequest:inContext:] (in CoreData)
9 0x00007fff93ec0397 -[NSSQLCore executeRequest:withContext:error:] (in CoreData)
10 0x00007fff93ebfe63 -[NSPersistentStoreCoordinator executeRequest:withContext:error:] (in
abort() called
This is part of crash log.
Looks like this problem is temporary and nothing to do with your Xcode or developer account.... most probably with apple servers/APIs that deals with prov/dev account. I am also getting same crash for last couple of hours. I tried many things - clean derived data, cache. Restarted machine etc but all in vain.
UPDATE: Try this on 'Terminal' app... [My issue probably resolved due to this !]
rm -rf "$(getconf DARWIN_USER_CACHE_DIR)/org.llvm.clang/ModuleCache"
Thanks for putting up this question here so I know there are others facing this problem. No useful info on google.
The crash log that I get when I click Xcode project > Target > Team pop up -
Process: Xcode [5047]
Path: /Applications/Xcode.app/Contents/MacOS/Xcode
Identifier: com.apple.dt.Xcode
Version: 6.1 (6604)
Build Info: IDEFrameworks-6604000000000000~2
App Item ID: 497799835
App External ID: 752282650
Code Type: X86-64 (Native)
Parent Process: launchd [367]
Responsible: Xcode [5047]
User ID: 501
Date/Time: 2014-11-14 15:17:59.448 -0500
OS Version: Mac OS X 10.9.5 (13F34)
Report Version: 11
Anonymous UUID: 7950E54F-D23B-CF06-2654-85C6536B1DB5
Crashed Thread: 13 Dispatch queue: NSManagedObjectContext Queue
Exception Type: EXC_CRASH (SIGABRT)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Application Specific Information:
ProductBuildVersion: 6A1052d
UNCAUGHT EXCEPTION (NSInvalidArgumentException): -[NSNull longLongValue]: unrecognized selector sent to instance 0x7fff7c399240
UserInfo: (null)
Hints: None
Backtrace:
0 0x00007fff8ffad244 __exceptionPreprocess (in CoreFoundation)
1 0x0000000105c4e2f4 DVTFailureHintExceptionPreprocessor (in DVTFoundation)
2 0x00007fff91ce1e75 objc_exception_throw (in libobjc.A.dylib)
3 0x00007fff8ffb012d -[NSObject(NSObject) doesNotRecognizeSelector:] (in CoreFoundation)
4 0x00007fff8ff0b272 ___forwarding___ (in CoreFoundation)
5 0x00007fff8ff0adf8 _CF_forwarding_prep_0 (in CoreFoundation)
6 0x00007fff9119152b -[NSSQLiteConnection execute] (in CoreData)
7 0x00007fff911abfd0 newFetchedRowsForFetchPlan_MT (in CoreData)
8 0x00007fff9119885f -[NSSQLCore objectsForFetchRequest:inContext:] (in CoreData)
9 0x00007fff91198397 -[NSSQLCore executeRequest:withContext:error:] (in CoreData)
10 0x00007fff91197e63 -[NSPersistentStoreCoordinator executeRequest:withContext:error:] (in CoreData)
11 0x00007fff91195c1b -[NSManagedObjectContext executeFetchRequest:error:] (in CoreData)
12 0x0000000105b573e5 __80+[DVTDeveloperPortalDatabase objectsWithEntityName:matchingPredicate:inContext:]_block_invoke (in DVTFoundation)
I need to know the answer to this as well. Getting same thing - only solution found so far is related to Xcode 4. I did discover that it is somehow related to derived data...
Reference to this thread:
Xcode crashing when fetching team list
In case you want to export an ipa:
xcodebuild archive -project $projectname.xcodeproj -scheme $schemename -archivePath projectname.xcarchive
xcodebuild -exportArchive -archivePath $projectname.xcarchive -exportPath $projectname -exportFormat ipa -exportProvisioningProfile “Provisioning Profile Name”
Not a good solution but I was able to upgrade to Yosemite and it resolved these issues.
It works later without any change. It may be caused by developer center issue.
Thanks for comments.

Xcode6 can't archive my project to ipa

Today I upgrade my Xcode to version 6.0.1, and I want to archive my project as an ipa file.
My process is Product -> Archive -> Export -> Save for Ad Hoc Deployment.
all are normal until I select my Development team,So I clicked the button"choose":
And then the Accident happened:
Process: Xcode [11022]
Path: /Applications/Xcode.app/Contents/MacOS/Xcode
Identifier: com.apple.dt.Xcode
Version: 6.0.1 (6528)
Build Info: IDEFrameworks-6528000000000000~2
App Item ID: 497799835
App External ID: 712682811
Code Type: X86-64 (Native)
Parent Process: launchd [286]
Responsible: Xcode [11022]
User ID: 501
Date/Time: 2014-09-23 21:51:40.939 +0800
OS Version: Mac OS X 10.9.5 (13F34)
Report Version: 11
Anonymous UUID: 689CEB1C-6C4F-C95D-8EB2-728905589271
Sleep/Wake UUID: 2F8703C9-8479-4E8A-B4BA-D4B067562EA5
Crashed Thread: 16 Dispatch queue: com.apple.root.default-priority
Exception Type: EXC_CRASH (SIGABRT)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Application Specific Information:
ProductBuildVersion: 6A317
UNCAUGHT EXCEPTION (NSInvalidArgumentException): *** -[__NSPlaceholderDictionary initWithObjects:forKeys:count:]: attempt to insert nil object from objects[1]
UserInfo: (null)
Hints: None
Backtrace:
0 0x00007fff90624244 __exceptionPreprocess (in CoreFoundation)
1 0x0000000104aa8184 DVTFailureHintExceptionPreprocessor (in DVTFoundation)
2 0x00007fff97920e75 objc_exception_throw (in libobjc.A.dylib)
3 0x00007fff90523dd1 -[__NSPlaceholderDictionary initWithObjects:forKeys:count:] (in CoreFoundation)
4 0x00007fff90539ad9 +[NSDictionary dictionaryWithObjects:forKeys:count:] (in CoreFoundation)
5 0x0000000105f6a535 __85-[IDEDistributionSigningAssetsStepViewController _attemptToResolveProvisioningError:]_block_invoke_2 (in IDEKit)
6 0x0000000104adebac __DVTDispatchAsync_block_invoke (in DVTFoundation)
7 0x00007fff8b85f1bb _dispatch_call_block_and_release (in libdispatch.dylib)
8 0x00007fff8b85c28d _dispatch_client_callout (in libdispatch.dylib)
9 0x00007fff8b85e082 _dispatch_root_queue_drain (in libdispatch.dylib)
10 0x00007fff8b85f177 _dispatch_worker_thread2 (in libdispatch.dylib)
11 0x00007fff973ecef8 _pthread_wqthread (in libsystem_pthread.dylib)
12 0x00007fff973effb9 start_wqthread (in libsystem_pthread.dylib)
abort() called
Application Specific Signatures:
NSInvalidArgumentException
My certificate is $99.Every is ok when I used Xcode5 yesterday.Please help me solving this problem.Thanks a lot.
Figured it out !
You have to go into your developer account (https://developer.apple.com/membercenter/index.action) and accept the new terms and conditions
Then Xcode6 stops crashing

Using Yiic with AMPPS on OS X

I'm trying to use yiic shell and yiic migrate tools on my iMac but I seem to be running in to some difficulties. I think it may be because I am using AMPPS as my development server instead of having installed Apache/PHP/MySQL separately. For example, in my project I have a model named Project that corresponds to a table in my MySQL database named tbl_project. I can invoke the yiic shell using :
./yiic shell /Applications/AMPPS/www/TrackStar/protected/config/main.php
However, when I run:
var_dump(Project::model()->findAll('id = 1'));
I get this lengthy error message:
Warning: PDO::__construct(): [2002] No such file or directory (trying to connect via unix:///var/mysql/mysql.sock) in /Applications/AMPPS/YiiRoot/framework/db/CDbConnection.php on line 423
exception 'CDbException' with message 'CDbConnection failed to open the DB connection: SQLSTATE[HY000] [2002] No such file or directory' in /Applications/AMPPS/YiiRoot/framework/db/CDbConnection.php:381
Stack trace:
#0 /Applications/AMPPS/YiiRoot/framework/db/CDbConnection.php(330): CDbConnection->open()
#1 /Applications/AMPPS/YiiRoot/framework/db/CDbConnection.php(308): CDbConnection-> setActive(true)
#2 /Applications/AMPPS/YiiRoot/framework/base/CModule.php(387): CDbConnection->init()
#3 /Applications/AMPPS/YiiRoot/framework/base/CModule.php(103): CModule->getComponent('db')
#4 /Applications/AMPPS/YiiRoot/framework/cli/commands/ShellCommand.php(131) : eval()'d code(1): CModule->__get('db')
#5 /Applications/AMPPS/YiiRoot/framework/cli/commands/ShellCommand.php(131): eval()
#6 /Applications/AMPPS/YiiRoot/framework/cli/commands/ShellCommand.php(99): ShellCommand->runShell()
#7 /Applications/AMPPS/YiiRoot/framework/console/CConsoleCommandRunner.php(67): ShellCommand->run(Array)
#8 /Applications/AMPPS/YiiRoot/framework/console/CConsoleApplication.php(91): CConsoleCommandRunner->run(Array)
#9 /Applications/AMPPS/YiiRoot/framework/base/CApplication.php(169): CConsoleApplication->processRequest()
#10 /Applications/AMPPS/YiiRoot/framework/yiic.php(33): CApplication->run()
#11 /Applications/AMPPS/www/TrackStar/protected/yiic.php(7): require_once('/Applications/A...')
#12 /Applications/AMPPS/www/TrackStar/protected/yiic(4): require_once('/Applications/A...')
#13 {main}
I think it is perhaps because it is trying to connect via
unix:///var/mysql/mysql.sock
which isn't where my MySQL shell resides. I have configured my config/main.php and config/console.php to reflect:
'db'=>array(
'connectionString' => 'mysql:host=localhost;dbname=trackstar',
'emulatePrepare' => true,
'username' => 'root',
'password' => 'mysql',
'charset' => 'utf8',
),
Can anyone help? I have the same problem when I try to use the migrations feature.
I think you should define the correct path to the socket
connectionString=>msql:host=localhost;dbname=trackstar;unix_socket=socket/path',