About error "attempt to call field"request" nil

Dear All,

When I open my file after implement the google network plugin, there is a error message which is " error “attempt to call field"request” nil. But, if I first open sample application of google network from corona ,and then open my file. It will be okay. Can anybody help me since it is frustrating :slight_smile:

Thanks A lot

Can you post your build.settings file?

Sure.

settings = {         orientation =         {                 default = "landscapeRight", supported = { "landscapeRight" },         }, android = { googlePlayGamesAppId = "30572782726", -- Your Google Play Games App Id usesPermissions = { "android.permission.INTERNET", "android.permission.WRITE\_EXTERNAL\_STORAGE", "com.android.vending.BILLING", "com.android.vending.CHECK\_LICENSE", }, CFBundleIconFile = "Icon.png", CFBundleIconFiles = { "Icon-xhdpi.png",  "Icon-hdpi.png", "Icon-mdpi.png", "Icon-ldpi.png",  }, },         iphone =         {                 plist =                 {                         UIPrerenderedIcon = true,                         UIApplicationExitsOnSuspend = false,                         CFBundleIconFile = "Icon.png", CFBundleIconFiles = {   "Icon.png",    "Icon@2x.png", }, UIApplicationExitsOnSuspend = false, -- must be false for single sign-on to work FacebookAppID = "XX0816124702262", -- replace XXXXXXXXX with your facebook appId CFBundleURLTypes = { { CFBundleURLSchemes = { "fb620816124702262", -- replace XXXXXXXXX with your facebook appId } } }                 },         }, plugins = { -- key is the name passed to Lua's 'require()' ["CoronaProvider.gameNetwork.google"] = { -- required publisherId = "com.coronalabs", supportedPlatforms = { android = true } }, }, }

Hi @ming2682,

This is likely a syntax error or “nesting” error in your file, as in, certain block(s) of your build.settings are not located in the proper place, or aren’t nested in the required place within other blocks.

Please go back and carefully inspect each section where you are placing things, and ensure that you have nested them properly, separated tables and items by commas, etc. The following tutorial may be helpful in understanding the core sections of the build.settings file and where things must reside within them:

http://coronalabs.com/blog/2014/07/08/tutorial-understanding-build-settings/

Take care,

Brent

Can you post your build.settings file?

Sure.

settings = {         orientation =         {                 default = "landscapeRight", supported = { "landscapeRight" },         }, android = { googlePlayGamesAppId = "30572782726", -- Your Google Play Games App Id usesPermissions = { "android.permission.INTERNET", "android.permission.WRITE\_EXTERNAL\_STORAGE", "com.android.vending.BILLING", "com.android.vending.CHECK\_LICENSE", }, CFBundleIconFile = "Icon.png", CFBundleIconFiles = { "Icon-xhdpi.png",  "Icon-hdpi.png", "Icon-mdpi.png", "Icon-ldpi.png",  }, },         iphone =         {                 plist =                 {                         UIPrerenderedIcon = true,                         UIApplicationExitsOnSuspend = false,                         CFBundleIconFile = "Icon.png", CFBundleIconFiles = {   "Icon.png",    "Icon@2x.png", }, UIApplicationExitsOnSuspend = false, -- must be false for single sign-on to work FacebookAppID = "XX0816124702262", -- replace XXXXXXXXX with your facebook appId CFBundleURLTypes = { { CFBundleURLSchemes = { "fb620816124702262", -- replace XXXXXXXXX with your facebook appId } } }                 },         }, plugins = { -- key is the name passed to Lua's 'require()' ["CoronaProvider.gameNetwork.google"] = { -- required publisherId = "com.coronalabs", supportedPlatforms = { android = true } }, }, }

Hi @ming2682,

This is likely a syntax error or “nesting” error in your file, as in, certain block(s) of your build.settings are not located in the proper place, or aren’t nested in the required place within other blocks.

Please go back and carefully inspect each section where you are placing things, and ensure that you have nested them properly, separated tables and items by commas, etc. The following tutorial may be helpful in understanding the core sections of the build.settings file and where things must reside within them:

http://coronalabs.com/blog/2014/07/08/tutorial-understanding-build-settings/

Take care,

Brent