Error: evaluating 'global.TYPED_ARRAY_SUPPORT'

Do you want to request a feature or report a bug?

a bug.

What is the current behavior?

when I just do this: import Amplify from 'aws-amplify'; everything crashes and throws the following error:

05-08 09:53:31.345  6995  7117 E ReactNativeJS: undefined is not an object (evaluating 'global.TYPED_ARRAY_SUPPORT')

05-08 09:53:31.363  6995  7117 W ReactNativeJS: Unable to symbolicate stack trace: undefined is not an object (evaluating 'self.fetch')
05-08 09:53:31.364  6995  7117 E ReactNativeJS: Module AppRegistry is not a registered callable module (calling runApplication)
05-08 09:53:31.365  6995  7117 E ReactNativeJS: Requiring module "fetch", which threw an exception: TypeError: undefined is not an object (evaluating 'self.fetch')
05-08 09:53:31.367  6995  7117 W ReactNativeJS: Unable to symbolicate stack trace: Requiring module "fetch", which threw an exception: TypeError: undefined is not an object (evaluating 'self.fetch')
05-08 09:53:31.367  6995  7117 W ReactNativeJS: Unable to symbolicate stack trace: undefined is not an object (evaluating '_require2(_dependencyMap[0], 'fetch').fetch')

Here is a screenshot:

If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem. Your bug will get fixed much faster if we can run your code and it doesn't have dependencies other than AWS Amplify.

I did include my aws ressources as descriped in the docs with just one exceptions: I did remove the RNPushNotificationPackage from my build as I do not need it.

Like I said above, all I've done was just use this piece of code in my App.js: import Amplify from 'aws-amplify';

Step by Step what I've done so far:

included these dependencies in my package.json:

"dependencies": {
    "aws-amplify": "^0.3.3",
    "aws-amplify-react-native": "^0.2.9",
    "moment": "^2.22.0",
    "prop-types": "^15.6.1",
    "react": "16.3.2",
    "react-native": "0.55.3",
    "react-native-check-box": "^2.1.0",
    "react-navigation": "^2.0.0",
    "react-redux": "^5.0.7",
    "redux": "^4.0.0",
    "amazon-cognito-identity-js": "^2.0.0",
    "aws-sdk": "2.234.1",
    "buffer": "^5.0.7",
    "mime-type": "^3.0.5",
    "path": "^0.12.7",
    "react-devtools": "^3.2.1",
    "react-native-elements": "^0.19.1",
    "react-native-fetch-blob": "^0.10.8",
    "react-native-prompt": "^1.0.0",
    "react-native-uuid": "^1.4.9",
    "react-native-vector-icons": "^4.3.0"
  },
  "devDependencies": {
    "babel-cli": "^6.26.0",
    "babel-core": "^6.26.0",
    "babel-jest": "22.4.3",
    "babel-polyfill": "^6.26.0",
    "babel-preset-env": "^1.6.1",
    "babel-preset-react": "^6.24.1",
    "babel-preset-react-native": "4.0.0",
    "eslint-config-airbnb": "^16.1.0",
    "eslint-config-react-native": "^2.0.0",
    "eslint-plugin-jsx-a11y": "^6.0.3",
    "eslint-plugin-react": "^7.7.0",
    "eslint-plugin-react-native": "^3.2.1",
    "flow-bin": "^0.71.0",
    "react-native-cli": "^2.0.1",
    "jest": "22.4.3",
    "react-test-renderer": "16.3.2"
  }

Used react-native link, to link all needed parts in android and ios.
Removed aws-amplify from: android\build.gradle, android\settings.gradle, android\app\build.gradle
Removed RNPushNotificationPackage  from: android\app\src\main\java\com\appname\MainApplication.java
cd android\ && gradlew clean results:

Incremental java compilation is an incubating feature.
:amazon-cognito-identity-js:clean
:app:clean
:react-native-fetch-blob:clean
:react-native-vector-icons:clean

BUILD SUCCESSFUL

Total time: 11.577 secs

cd .. && react-native run-android results in a successful build as well (I spare you guys with the huge output).

What is the expected behavior?

that the import works without an error.

Which versions of Amplify, and which browser / OS are affected by this issue? Did this work in previous versions?

see in dependencies above
I'm on windows
I did not try any different versions BUT:
The example here: https://github.com/aws-samples/aws-mobile-react-native-starter was working as expected (with "aws-amplify": "^0.2.4"). After some research and the reason that I did not want to inlcude firebase dependencies lead me to remove RNPushNotificationPackage and aws-amplify from the above mentioned files.

You can turn on the debug mode to provide more info for us by setting window.LOG_LEVEL = 'DEBUG'; in your app.

if needed tell me how to do it in react-native.

@Megajin so the react native works for you in your windows machine and with<EMAIL_ADDRESS>

@powerful23 no, I did update my report about that. The aws-mobile-react-native-starter example is using "aws-amplify": "^0.2.4".
Here are the full dependencies on the working example:
"dependencies": {
    "aws-amplify": "^0.2.4",
    "aws-amplify-react-native": "^0.2.3",
    "amazon-cognito-identity-js": "^1.31.0",
    "aws-sdk": "2.177.0",
    "babel-preset-es2015": "^6.24.1",
    "buffer": "^5.0.7",
    "mime-type": "^3.0.5",
    "path": "^0.12.7",
    "prop-types": "^15.6.0",
    "react": "16.0.0-alpha.12",
    "react-devtools": "^2.5.0",
    "react-native": "0.47.1",
    "react-native-elements": "^0.15.0",
    "react-native-fetch-blob": "^0.10.8",
    "react-native-prompt": "^1.0.0",
    "react-native-uuid": "^1.4.9",
    "react-native-vector-icons": "^4.3.0",
    "react-navigation": "1.0.0-beta.12"
  },
  "devDependencies": {
    "babel-jest": "20.0.3",
    "babel-preset-react-native": "2.1.0",
    "eslint": "^4.4.1",
    "eslint-config-airbnb": "^15.1.0",
    "eslint-plugin-import": "^2.7.0",
    "eslint-plugin-jsx-a11y": "^6.0.2",
    "eslint-plugin-react": "^7.2.0",
    "flow-bin": "^0.52.0",
    "jest": "20.0.4",
    "react-native-cli": "^2.0.1",
    "react-test-renderer": "16.0.0-alpha.12"
  }

I also get this on the same versions of aws-amplify and aws-amplify-react-native. It appears to be something to do thrown as react native support buffer/typed arrays. I am unsure if it is related but I have also been having trouble with undefineds related to crypto all day. global.crypto and getRandomValues in particular

@paul-doherty I guess it is somehow related (see below). Hopefully we'll find the cause for this issue.
@powerful23 this is going to be a long comment, I'll share more of my code and steps:

For a "clean" Android Folder without any react-native link  all I did was to delete the Android + iOS folders and did a node_modules/.bin/react-native upgrade. Now everything is how it was in the beginning (no react-native link).

cd android/ && gradlew clean -> Successful Build.

cd .. && react-native run-android -> Successful Build.

import Amplify from 'aws-amplify; -> results in the same error as descriped above.

I did try to require this before everyhting else: global.Buffer = global.Buffer || require('buffer').Buffer; still no luck.

npm install<EMAIL_ADDRESS>to downgrade and check if it is working -> Yet another error @paul-doherty take a look, I get the same error as you:

05-09 06:51:56.485 12196 12243 E ReactNativeJS: undefined is not an object (evaluating '_global.crypto')
05-09 06:51:56.496 12196 12243 W ReactNativeJS: Unable to symbolicate stack trace: undefined is not an object (evaluating 'self.fetch')
05-09 06:51:56.498 12196 12243 E ReactNativeJS: Module AppRegistry is not a registered callable module (calling runApplication)
05-09 06:51:56.498 12196 12243 E ReactNativeJS: Requiring module "fetch", which threw an exception: TypeError: undefined is not an object (evaluating 'self.fetch')
05-09 06:51:56.501 12196 12243 W ReactNativeJS: Unable to symbolicate stack trace: Requiring module "fetch", which threw an exception: TypeError: undefined is not an object (evaluating 'self.fetch')
05-09 06:51:56.501 12196 12243 W ReactNativeJS: Unable to symbolicate stack trace: undefined is not an object (evaluating '_require2(_dependencyMap[0], 'fetch').fetch')

Screenshot:

I'll look into the example and see if I can find something different. Until then ->
Here is my full source:
./index.js:
/************************************************************
 * Index.js                                                 *
 * Entry point of App.                                      *
 * Just route to the main JS to make things easy and clear. *
 ************************************************************/

// Appregistry from React to "register" app.
import { AppRegistry } from 'react-native';
// Main JS which holds all logic (App itself).
import App from './src/App';

/**********************************
* Begin Private Area for Module. *
**********************************/

// @NOTE: This Section is shared through every Instance of this given class.
// - You have been warned. -

/********************************
* End Private Area for Module. *
********************************/

/**
 * Register Component and route to main app js.
 */
AppRegistry.registerComponent('appName', () => App);

src\App.js:
/*************************************************
 * Main entry for the APP.                       *
 * Everything necessary will start from here on. *
 *************************************************/

// global.Buffer = global.Buffer || require('buffer').Buffer; // Required for aws sigv4 signing

import React, { Component } from 'react';
import { View } from 'react-native';
// import { Provider } from 'react-redux';
// import { createStore } from 'redux';

import Amplify from 'aws-amplify'; // Here the error happens!

// import { withAuthenticator } from 'aws-amplify-react-native';
// import {awsmobile} from '../../../core/aws/aws-exports';

import Login from './view/components/render-components/login';
import Register from './view/components/render-components/register';
import LoadingScreen from './view/components/render-components/loading-screen';

import { MainStyle } from './view/assets/styles/main-style';

// Amplify.configure(awsmobile);

/**
 * Main Class.
 * @extends Component
 */
class App extends Component {
/**
* Do React stuff.
*/
}
export default App;

android\build.gradle:
// Top-level build file where you can add configuration options common to all sub-projects/modules.

buildscript {
    repositories {
        jcenter()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:2.2.3'

        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
    }
}

allprojects {
    repositories {
        mavenLocal()
        jcenter()
        maven {
            // All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
            url "$rootDir/../node_modules/react-native/android"
        }
    }
}

android\settings.gradle:
rootProject.name = 'YOUR_APP_NAME'

include ':app'

android\app\build.gradle:
apply plugin: "com.android.application"

import com.android.build.OutputFile

/**
 * The react.gradle file registers a task for each build variant (e.g. bundleDebugJsAndAssets
 * and bundleReleaseJsAndAssets).
 * These basically call `react-native bundle` with the correct arguments during the Android build
 * cycle. By default, bundleDebugJsAndAssets is skipped, as in debug/dev mode we prefer to load the
 * bundle directly from the development server. Below you can see all the possible configurations
 * and their defaults. If you decide to add a configuration block, make sure to add it before the
 * `apply from: "../../node_modules/react-native/react.gradle"` line.
 *
 * project.ext.react = [
 *   // the name of the generated asset file containing your JS bundle
 *   bundleAssetName: "index.android.bundle",
 *
 *   // the entry file for bundle generation
 *   entryFile: "index.android.js",
 *
 *   // whether to bundle JS and assets in debug mode
 *   bundleInDebug: false,
 *
 *   // whether to bundle JS and assets in release mode
 *   bundleInRelease: true,
 *
 *   // whether to bundle JS and assets in another build variant (if configured).
 *   // See http://tools.android.com/tech-docs/new-build-system/user-guide#TOC-Build-Variants
 *   // The configuration property can be in the following formats
 *   //         'bundleIn${productFlavor}${buildType}'
 *   //         'bundleIn${buildType}'
 *   // bundleInFreeDebug: true,
 *   // bundleInPaidRelease: true,
 *   // bundleInBeta: true,
 *
 *   // whether to disable dev mode in custom build variants (by default only disabled in release)
 *   // for example: to disable dev mode in the staging build type (if configured)
 *   devDisabledInStaging: true,
 *   // The configuration property can be in the following formats
 *   //         'devDisabledIn${productFlavor}${buildType}'
 *   //         'devDisabledIn${buildType}'
 *
 *   // the root of your project, i.e. where "package.json" lives
 *   root: "../../",
 *
 *   // where to put the JS bundle asset in debug mode
 *   jsBundleDirDebug: "$buildDir/intermediates/assets/debug",
 *
 *   // where to put the JS bundle asset in release mode
 *   jsBundleDirRelease: "$buildDir/intermediates/assets/release",
 *
 *   // where to put drawable resources / React Native assets, e.g. the ones you use via
 *   // require('./image.png')), in debug mode
 *   resourcesDirDebug: "$buildDir/intermediates/res/merged/debug",
 *
 *   // where to put drawable resources / React Native assets, e.g. the ones you use via
 *   // require('./image.png')), in release mode
 *   resourcesDirRelease: "$buildDir/intermediates/res/merged/release",
 *
 *   // by default the gradle tasks are skipped if none of the JS files or assets change; this means
 *   // that we don't look at files in android/ or ios/ to determine whether the tasks are up to
 *   // date; if you have any other folders that you want to ignore for performance reasons (gradle
 *   // indexes the entire tree), add them here. Alternatively, if you have JS files in android/
 *   // for example, you might want to remove it from here.
 *   inputExcludes: ["android/**", "ios/**"],
 *
 *   // override which node gets called and with what additional arguments
 *   nodeExecutableAndArgs: ["node"],
 *
 *   // supply additional arguments to the packager
 *   extraPackagerArgs: []
 * ]
 */

project.ext.react = [
    entryFile: "index.js"
]

apply from: "../../node_modules/react-native/react.gradle"

/**
 * Set this to true to create two separate APKs instead of one:
 *   - An APK that only works on ARM devices
 *   - An APK that only works on x86 devices
 * The advantage is the size of the APK is reduced by about 4MB.
 * Upload all the APKs to the Play Store and people will download
 * the correct one based on the CPU architecture of their device.
 */
def enableSeparateBuildPerCPUArchitecture = false

/**
 * Run Proguard to shrink the Java bytecode in release builds.
 */
def enableProguardInReleaseBuilds = false

android {
    compileSdkVersion 23
    buildToolsVersion "23.0.1"

    defaultConfig {
        applicationId "com.yourappname"
        minSdkVersion 16
        targetSdkVersion 22
        versionCode 1
        versionName "1.0"
        ndk {
            abiFilters "armeabi-v7a", "x86"
        }
    }
    splits {
        abi {
            reset()
            enable enableSeparateBuildPerCPUArchitecture
            universalApk false  // If true, also generate a universal APK
            include "armeabi-v7a", "x86"
        }
    }
    buildTypes {
        release {
            minifyEnabled enableProguardInReleaseBuilds
            proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro"
        }
    }
    // applicationVariants are e.g. debug, release
    applicationVariants.all { variant ->
        variant.outputs.each { output ->
            // For each separate APK per architecture, set a unique version code as described here:
            // http://tools.android.com/tech-docs/new-build-system/user-guide/apk-splits
            def versionCodes = ["armeabi-v7a":1, "x86":2]
            def abi = output.getFilter(OutputFile.ABI)
            if (abi != null) {  // null for the universal-debug, universal-release variants
                output.versionCodeOverride =
                        versionCodes.get(abi) * 1048576 + defaultConfig.versionCode
            }
        }
    }
}

dependencies {
    compile fileTree(dir: "libs", include: ["*.jar"])
    compile "com.android.support:appcompat-v7:23.0.1"
    compile "com.facebook.react:react-native:+"  // From node_modules
}

// Run this once to be able to run the application with BUCK
// puts all compile dependencies into folder libs for BUCK to use
task copyDownloadableDepsToLibs(type: Copy) {
    from configurations.compile
    into 'libs'
}

android\app\src\main\AndroidManifest.xml:
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.sieglassistent">

    <uses-permission android:name="android.permission.INTERNET" />
    <uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW"/>

    <application
      android:name=".MainApplication"
      android:label="@string/app_name"
      android:icon="@mipmap/ic_launcher"
      android:allowBackup="false"
      android:theme="@style/AppTheme">
      <activity
        android:name=".MainActivity"
        android:label="@string/app_name"
        android:configChanges="keyboard|keyboardHidden|orientation|screenSize"
        android:windowSoftInputMode="adjustResize">
        <intent-filter>
            <action android:name="android.intent.action.MAIN" />
            <category android:name="android.intent.category.LAUNCHER" />
        </intent-filter>
      </activity>
      <activity android:name="com.facebook.react.devsupport.DevSettingsActivity" />
    </application>

</manifest>

android\app\src\main\java\com\appname\MainActivity.java:
package com.appname;

import com.facebook.react.ReactActivity;

public class MainActivity extends ReactActivity {

    /**
     * Returns the name of the main component registered from JavaScript.
     * This is used to schedule rendering of the component.
     */
    @Override
    protected String getMainComponentName() {
        return "appname";
    }
}

android\app\src\main\java\com\sieglassistent\MainApplication.java:
package com.appname;

import android.app.Application;

import com.facebook.react.ReactApplication;
import com.facebook.react.ReactNativeHost;
import com.facebook.react.ReactPackage;
import com.facebook.react.shell.MainReactPackage;
import com.facebook.soloader.SoLoader;

import java.util.Arrays;
import java.util.List;

public class MainApplication extends Application implements ReactApplication {

  private final ReactNativeHost mReactNativeHost = new ReactNativeHost(this) {
    @Override
    public boolean getUseDeveloperSupport() {
      return BuildConfig.DEBUG;
    }

    @Override
    protected List<ReactPackage> getPackages() {
      return Arrays.<ReactPackage>asList(
          new MainReactPackage()
      );
    }

    @Override
    protected String getJSMainModuleName() {
      return "index";
    }
  };

  @Override
  public ReactNativeHost getReactNativeHost() {
    return mReactNativeHost;
  }

  @Override
  public void onCreate() {
    super.onCreate();
    SoLoader.init(this, /* native exopackage */ false);
  }
}

@powerful23 @paul-doherty
It is working now for me. I did the following:

remove all files from my C:\Users\Megajin\AppData\Local\Temp.
removed the folder node_modules .
installed all Packaages with npm install --no-optional.
In current windows console: set RNFB_ANDROID_PERMISSIONS=true (this is for the current session so I can link react-native-fetch-blob).
react-native link

Everything works as expected, but I still do not know what the cause was. I recommend everyone having the same issue to follow my steps above and try a clean install of all packages. If the error still occurs try to remove packages one by one and start with your devDependencies.
I should mention that I did a gradle upgrade. I'll provide my new updated sources for the android folder:
android\gradle\wrapper\gradle-wrapper.properties:
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-4.4-all.zip

android\build.gradle:
// Top-level build file where you can add configuration options common to all sub-projects/modules.

buildscript {
    repositories {
        jcenter()
        google() // was needed to prevent the 'lib not found error'
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:3.1.0'
        classpath 'com.google.gms:google-services:3.2.1'
        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
    }
}

allprojects {
    repositories {
        mavenLocal()
        jcenter()
        maven {
            // All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
            url "$rootDir/../node_modules/react-native/android"
        }
        google()
    }
}

android\settings.gradle:
rootProject.name = 'YOUR_APP_NAME'
include ':react-native-vector-icons'
project(':react-native-vector-icons').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-vector-icons/android')
include ':react-native-firebase'
project(':react-native-firebase').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-firebase/android')
include ':react-native-fetch-blob'
project(':react-native-fetch-blob').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-fetch-blob/android')
include ':aws-amplify-react-native'
project(':aws-amplify-react-native').projectDir = new File(rootProject.projectDir, '../node_modules/aws-amplify-react-native/android')
include ':amazon-cognito-identity-js'
project(':amazon-cognito-identity-js').projectDir = new File(rootProject.projectDir, '../node_modules/amazon-cognito-identity-js/android')

include ':app'

android\app\build.gradle:
apply plugin: "com.android.application"

import com.android.build.OutputFile

/**
 * The react.gradle file registers a task for each build variant (e.g. bundleDebugJsAndAssets
 * and bundleReleaseJsAndAssets).
 * These basically call `react-native bundle` with the correct arguments during the Android build
 * cycle. By default, bundleDebugJsAndAssets is skipped, as in debug/dev mode we prefer to load the
 * bundle directly from the development server. Below you can see all the possible configurations
 * and their defaults. If you decide to add a configuration block, make sure to add it before the
 * `apply from: "../../node_modules/react-native/react.gradle"` line.
 *
 * project.ext.react = [
 *   // the name of the generated asset file containing your JS bundle
 *   bundleAssetName: "index.android.bundle",
 *
 *   // the entry file for bundle generation
 *   entryFile: "index.android.js",
 *
 *   // whether to bundle JS and assets in debug mode
 *   bundleInDebug: false,
 *
 *   // whether to bundle JS and assets in release mode
 *   bundleInRelease: true,
 *
 *   // whether to bundle JS and assets in another build variant (if configured).
 *   // See http://tools.android.com/tech-docs/new-build-system/user-guide#TOC-Build-Variants
 *   // The configuration property can be in the following formats
 *   //         'bundleIn${productFlavor}${buildType}'
 *   //         'bundleIn${buildType}'
 *   // bundleInFreeDebug: true,
 *   // bundleInPaidRelease: true,
 *   // bundleInBeta: true,
 *
 *   // whether to disable dev mode in custom build variants (by default only disabled in release)
 *   // for example: to disable dev mode in the staging build type (if configured)
 *   devDisabledInStaging: true,
 *   // The configuration property can be in the following formats
 *   //         'devDisabledIn${productFlavor}${buildType}'
 *   //         'devDisabledIn${buildType}'
 *
 *   // the root of your project, i.e. where "package.json" lives
 *   root: "../../",
 *
 *   // where to put the JS bundle asset in debug mode
 *   jsBundleDirDebug: "$buildDir/intermediates/assets/debug",
 *
 *   // where to put the JS bundle asset in release mode
 *   jsBundleDirRelease: "$buildDir/intermediates/assets/release",
 *
 *   // where to put drawable resources / React Native assets, e.g. the ones you use via
 *   // require('./image.png')), in debug mode
 *   resourcesDirDebug: "$buildDir/intermediates/res/merged/debug",
 *
 *   // where to put drawable resources / React Native assets, e.g. the ones you use via
 *   // require('./image.png')), in release mode
 *   resourcesDirRelease: "$buildDir/intermediates/res/merged/release",
 *
 *   // by default the gradle tasks are skipped if none of the JS files or assets change; this means
 *   // that we don't look at files in android/ or ios/ to determine whether the tasks are up to
 *   // date; if you have any other folders that you want to ignore for performance reasons (gradle
 *   // indexes the entire tree), add them here. Alternatively, if you have JS files in android/
 *   // for example, you might want to remove it from here.
 *   inputExcludes: ["android/**", "ios/**"],
 *
 *   // override which node gets called and with what additional arguments
 *   nodeExecutableAndArgs: ["node"],
 *
 *   // supply additional arguments to the packager
 *   extraPackagerArgs: []
 * ]
 */

project.ext.react = [
    entryFile: "index.js"
]

apply from: "../../node_modules/react-native/react.gradle"

/**
 * Set this to true to create two separate APKs instead of one:
 *   - An APK that only works on ARM devices
 *   - An APK that only works on x86 devices
 * The advantage is the size of the APK is reduced by about 4MB.
 * Upload all the APKs to the Play Store and people will download
 * the correct one based on the CPU architecture of their device.
 */
def enableSeparateBuildPerCPUArchitecture = false

/**
 * Run Proguard to shrink the Java bytecode in release builds.
 */
def enableProguardInReleaseBuilds = false

android {
    compileSdkVersion 23
    buildToolsVersion "23.0.1"

    defaultConfig {
        applicationId "com.appname"
        minSdkVersion 16
        targetSdkVersion 22
        versionCode 1
        versionName "1.0"
        ndk {
            abiFilters "armeabi-v7a", "x86"
        }
    }
    splits {
        abi {
            reset()
            enable enableSeparateBuildPerCPUArchitecture
            universalApk false  // If true, also generate a universal APK
            include "armeabi-v7a", "x86"
        }
    }
    buildTypes {
        release {
            minifyEnabled enableProguardInReleaseBuilds
            proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro"
        }
    }
    // applicationVariants are e.g. debug, release
    applicationVariants.all { variant ->
        variant.outputs.each { output ->
            // For each separate APK per architecture, set a unique version code as described here:
            // http://tools.android.com/tech-docs/new-build-system/user-guide/apk-splits
            def versionCodes = ["armeabi-v7a":1, "x86":2]
            def abi = output.getFilter(OutputFile.ABI)
            if (abi != null) {  // null for the universal-debug, universal-release variants
                output.versionCodeOverride =
                        versionCodes.get(abi) * 1048576 + defaultConfig.versionCode
            }
        }
    }
}

dependencies {
    implementation(project(':react-native-firebase')) {
        transitive = false
    }
    // Firebase dependencies
    implementation "com.google.android.gms:play-services-base:15.0.0"
    implementation "com.google.firebase:firebase-core:15.0.2"
    implementation project(':aws-amplify-react-native')
    implementation project(':amazon-cognito-identity-js')
    implementation project(':react-native-fetch-blob')
    implementation project(':react-native-vector-icons')
    implementation fileTree(dir: "libs", include: ["*.jar"])
    implementation "com.android.support:appcompat-v7:23.0.1"
    implementation "com.facebook.react:react-native:+"  // From node_modules
}

// Run this once to be able to run the application with BUCK
// puts all compile dependencies into folder libs for BUCK to use
task copyDownloadableDepsToLibs(type: Copy) {
    from configurations.compile
    into 'libs'
}

apply plugin: 'com.google.gms.google-services'

android\app\src\main\AndroidManifest.xml:
<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.appname">

  <uses-permission android:name="android.permission.INTERNET"/>
  <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
  <uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW"/>

  <application android:name=".MainApplication" android:label="@string/app_name" android:icon="@mipmap/ic_launcher" android:allowBackup="false" android:theme="@style/AppTheme">
    <activity android:name=".MainActivity" android:label="@string/app_name" android:configChanges="keyboard|keyboardHidden|orientation|screenSize" android:windowSoftInputMode="adjustResize">
      <intent-filter>
        <action android:name="android.intent.action.MAIN"/>
        <category android:name="android.intent.category.LAUNCHER"/>
        <action android:name="android.intent.action.DOWNLOAD_COMPLETE"/>
      </intent-filter>
    </activity>
    <activity android:name="com.facebook.react.devsupport.DevSettingsActivity"/>
  </application>

</manifest>

android\app\src\main\java\com\appname\MainActivity.java:
package com.appname;

import com.facebook.react.ReactActivity;

public class MainActivity extends ReactActivity {

    /**
     * Returns the name of the main component registered from JavaScript.
     * This is used to schedule rendering of the component.
     */
    @Override
    protected String getMainComponentName() {
        return "appname";
    }
}

android\app\src\main\java\com\appname\MainApplication.java:
package com.appname;

import android.app.Application;

import com.facebook.react.ReactApplication;
import com.oblador.vectoricons.VectorIconsPackage;
import io.invertase.firebase.RNFirebasePackage;
import com.RNFetchBlob.RNFetchBlobPackage;
import com.amazonaws.amplify.pushnotification.RNPushNotificationPackage;
import com.amazonaws.RNAWSCognitoPackage;
import com.facebook.react.ReactNativeHost;
import com.facebook.react.ReactPackage;
import com.facebook.react.shell.MainReactPackage;
import com.facebook.soloader.SoLoader;

import java.util.Arrays;
import java.util.List;

public class MainApplication extends Application implements ReactApplication {

  private final ReactNativeHost mReactNativeHost = new ReactNativeHost(this) {
    @Override
    public boolean getUseDeveloperSupport() {
      return BuildConfig.DEBUG;
    }

    @Override
    protected List<ReactPackage> getPackages() {
      return Arrays.<ReactPackage>asList(
          new MainReactPackage(),
            new VectorIconsPackage(),
            new RNFirebasePackage(),
            new RNFetchBlobPackage(),
            new RNPushNotificationPackage(),
            new RNAWSCognitoPackage()
      );
    }

    @Override
    protected String getJSMainModuleName() {
      return "index";
    }
  };

  @Override
  public ReactNativeHost getReactNativeHost() {
    return mReactNativeHost;
  }

  @Override
  public void onCreate() {
    super.onCreate();
    SoLoader.init(this, /* native exopackage */ false);
  }
}

It's still the same for me I'm afraid. As soon as I attempt to use Auth I get TYPED_ARRAY_SUPPORT is undefined.
The error is being thrown from aws-sdk where it looks like global is undefined

"dependencies": {
    "@types/react-native-i18n": "^2.0.0",
    "@types/react-native-navigation": "^1.1.9",
    "aws-amplify": "^0.3.3",
    "aws-amplify-react-native": "^0.2.9",
    "babel-preset-es2015": "^6.24.1",
    "moment": "^2.22.1",
    "react": "16.3.1",
    "react-native": "0.55.3",
    "react-native-i18n": "^2.0.12",
    "react-native-navigation": "^1.1.457",
    "remove": "^0.1.5",
    "tslib": "^1.9.0"
  },
  "devDependencies": {
    "@types/node": "^10.0.4",
    "@types/react": "^16.3.11",
    "@types/react-native": "^0.55.3",
    "babel-jest": "22.4.3",
    "babel-preset-react-native": "4.0.0",
    "jest": "22.4.3",
    "prettier": "^1.12.1",
    "react-native-typescript-transformer": "^1.2.5",
    "react-test-renderer": "16.3.1",
    "ts-jest": "^22.4.5",
    "tslint": "^5.9.1",
    "tslint-config-prettier": "^1.12.0",
    "tslint-react": "^3.6.0",
    "typescript": "2.7.2"
  },

Ok I found what my problem was.
I was excluding node_modules in my tsconfig like below.
"exclude": [
    "node_modules"
  ],

Turns out this doesn't exclude it. I set my rootDir to force it to exclude node_modules and now all is good
"rootDirs": [ "app" ],

We're running into this problem as well, simply using the aws-sdk. Relevant things...
"aws-sdk": "^2.242.1",
"react": "16.3.1",
"expo": "^27.0.0",
"react-native": "https://github.com/expo/react-native/archive/sdk-27.0.0.tar.gz",

We tried the shimming strategy discussed here, no dice. As soon as we import 'aws-sdk' it blows up.
Any ideas?

@AndrewSouthpaw have you tried the steps descriped by me in one of the above comments?

I am facing the same issue when importing aws-amplify to my react-native app
import Amplify from 'aws-amplify';
it does work when I import it from package dist folder though.
import Amplify from 'aws-amplify/dist/aws-amplify';

@michalziolkowski same question to you:

@AndrewSouthpaw have you tried the steps descriped by me in one of the above comments?

Yes, no effect.

Likewise. We've been stuck on this for days on our React Native project. We've been able to track the problem to two aws-sdk dependencies, because we can work around it by doing the following:
in ../node_modules/aws-sdk/dist/xml2js.js
change line 2229 to Buffer.TYPED_ARRAY_SUPPORT = typedArraySupport()
...which throws an error from an outdated crypto-browserify dependency, so then:
in ../node_modules/amazon-cognito-identity-js/node_modules/crypto-browserify/rng.js
change line 4 to var _global = this || window || {};
We're still trying to come up with a solution. If anyone has more luck with this, please let me know.

@powerful23 @elorzafe do you guys mind if I request reopening this issue? It seems that there is more to this issue to be investigated.
@michalziolkowski & @AceNorth could you guys please provide some more information about your environment? Like which OS, your Package.json, npm/yarn, which Emulator Device etc.

I am facing the same issue when importing aws-amplify to my react-native app
import Amplify from 'aws-amplify';
it does work when I import it from package dist folder though.
import Amplify from 'aws-amplify/dist/aws-amplify';

As far as I know, if something like this happens (and it happens if you are using npm) then your folder node_modules is corrupt. Have you installed the same package via npm install -g {package-name} and npm install --save {package-name}? You can investigate this easily, just uninstall aws-amplify locally and try importing it again. If it works you have it installed somewhere else. Or any of the dependencies of aws-amplify.

Likewise. We've been stuck on this for days on our React Native project. We've been able to track the problem to two aws-sdk dependencies, because we can work around it by doing the following:

in ../node_modules/aws-sdk/dist/xml2js.js
change line 2229 to Buffer.TYPED_ARRAY_SUPPORT = typedArraySupport()
...which throws an error from an outdated crypto-browserify dependency, so then:
in ../node_modules/amazon-cognito-identity-js/node_modules/crypto-browserify/rng.js
change line 4 to var _global = this || window || {};
We're still trying to come up with a solution. If anyone has more luck with this, please let me know.
Could you please try to add this at the top of your index.js:
global.Buffer = global.Buffer || require('buffer').Buffer; // Required for aws sigv4 signing

I tried that buffer fix already, as it was suggested above. No luck. We use npm, emulate on an iPhone 8 Plus, I'm on Sierra 10.13.4, and here's our package.json:
  "name": "PROJECT_NAME",
  "version": "0.0.1",
  "private": true,
  "jest": {
    "preset": "react-native",
    "verbose": true,
    "collectCoverage": true,
    "collectCoverageFrom": [
      "Common/**/*.{js|jsx}",
      "Web/src/js/**/*.{js|jsx}",
      "!**/node_modules/**",
      "!**/constants.js",
      "!**/appConfig.js",
      "!**/env.json",
      "!Common/env.json",
      "!Common/awsConfig.js",
      "!Common/reducers/root-reducer.js",
      "!Common/stores/*.js",
      "!Common/actions/clients.js"
    ],
    "testPathIgnorePatterns": [
      "/(node_modules|scripts)/"
    ],
    "setupFiles": [
      "./__mocks__/setup.js"
    ],
    "transform": {
      "^.+\\.js?$": "babel-jest"
    },
    "coverageThreshold": {
      "global": {
        "branches": 80,
        "functions": 80,
        "lines": 80,
        "statements": 80
      }
    },
    "moduleNameMapper": {
      "\\.(css|less)$": "identity-obj-proxy"
    },
    "moduleDirectories": [
      "node_modules",
      "Common"
    ],
    "testEnvironment": "jsdom"
  },
  "scripts": {
    "start": "node node_modules/react-native/local-cli/cli.js start",
    "clean": "./node_modules/react-native/packager/packager.sh start --reset-cache",
    "test-web": "NODE_ENV=test PLATFORM=web TEST=true jest --coverage --watch",
    "test-native": "NODE_ENV=development PLATFORM=native TEST=true jest --coverage --watch",
    "unbuild": "rm -rf node_modules || rd /s /q node_modules",
    "build": "npm run unbuild && npm install",
    "local": "concurrently \"react-native run-ios\" \"cd Web && ./scripts/runDevServer.sh\"",
    "webpack": "cd Web && ./scripts/runDevServer.sh",
    "build-web-client-prod": "cd Web && ./scripts/buildWebClientProd.sh",
    "build-web-server-prod": "cd Web && ./scripts/buildWebServerProd.sh",
    "start-web-prod": "cd Web && ./scripts/runProdServer.sh",
    "deploy-native": "code-push release-react LGSSearch ios",
    "deploy-native-promote": "code-push promote LGSSearch Staging Production",
    "deploy-native-rollback": "code-push rollback LGSSearch Production"
  },
  "dependencies": {
    "aws-amplify": "^0.2.9",
    "aws-amplify-react": "^0.1.32",
    "axios": "^0.17.1",
    "babel-loader": "^7.1.2",
    "babel-plugin-add-module-exports": "^0.2.1",
    "babel-plugin-react-html-attrs": "^2.0.0",
    "babel-plugin-transform-class-properties": "^6.3.13",
    "babel-plugin-transform-decorators-legacy": "^1.3.4",
    "babel-plugin-universal-import": "^1.4.0",
    "babel-polyfill": "^6.23.0",
    "babel-preset-es2015": "^6.3.13",
    "babel-preset-react": "^6.3.13",
    "babel-preset-stage-0": "^6.3.13",
    "css-loader": "^0.28.7",
    "events": "^1.1.1",
    "express": "^4.16.2",
    "express-robots": "^0.1.6",
    "extract-css-chunks-webpack-plugin": "^2.0.18",
    "history": "^4.7.2",
    "json-loader": "^0.5.4",
    "jwt-decode": "^2.2.0",
    "lodash": "^4.17.4",
    "moment": "^2.19.2",
    "moment-timezone": "^0.5.13",
    "morgan": "^1.9.0",
    "paypal-checkout": "^4.0.199",
    "prop-types": "^15.6.0",
    "raven-js": "^3.24.2",
    "react": "^16.2.0",
    "react-autosuggest": "^9.3.2",
    "react-burger-menu": "^2.4.2",
    "react-country-region-selector": "^1.2.3",
    "react-dom": "16.1.1",
    "react-ga": "^2.5.0",
    "react-helmet": "^5.2.0",
    "react-image-magnify": "^2.3.2",
    "react-lazyload": "^2.2.8",
    "react-lifecycles-compat": "^3.0.4",
    "react-metrics": "^2.4.1",
    "react-moment": "^0.6.8",
    "react-native": "0.50.3",
    "react-native-code-push": "^5.2.0-beta",
    "react-native-fast-image": "^2.0.1",
    "react-native-orientation": "^3.1.3",
    "react-native-photo-view": "1.5.2",
    "react-native-swiper": "^1.5.4",
    "react-native-vector-icons": "^4.4.2",
    "react-redux": "5.0.6",
    "react-router-config": "^1.0.0-beta.4",
    "react-router-dom": "^4.2.2",
    "react-scroll": "^1.7.7",
    "react-slick": "^0.19.0",
    "react-stripe-elements": "^1.6.0",
    "react-toastify": "^3.0.0",
    "react-universal-component": "^2.8.3",
    "react-virtualized": "^9.18.5",
    "redux": "3.7.2",
    "redux-action-buffer": "^1.1.0",
    "redux-logger": "^3.0.1",
    "redux-persist": "^5.4.0",
    "redux-thunk": "^2.2.0",
    "uuid": "^3.1.0",
    "validator": "^9.4.1",
    "webpack": "^3.8.1",
    "webpack-dev-server": "^2.11.1",
    "webpack-flush-chunks": "^1.2.3",
    "webpack-hot-middleware": "^2.21.0",
    "whatwg-fetch": "^2.0.4"
  },
  "devDependencies": {
    "axios-mock-adapter": "^1.15.0",
    "babel-core": "^6.24.1",
    "babel-eslint": "^8.0.2",
    "babel-jest": "^21.2.0",
    "babel-plugin-dual-import": "^1.2.1",
    "babel-plugin-module-resolver": "^3.0.0",
    "babel-plugin-transform-runtime": "^6.23.0",
    "babel-preset-env": "^1.6.1",
    "babel-preset-react-native": "4.0.0",
    "babel-preset-stage-2": "^6.24.1",
    "enzyme": "^3.3.0",
    "enzyme-adapter-react-16": "^1.1.1",
    "enzyme-to-json": "^3.3.3",
    "eslint": "^4.11.0",
    "eslint-config-airbnb": "^16.1.0",
    "eslint-config-airbnb-base": "^12.1.0",
    "eslint-plugin-import": "^2.2.0",
    "eslint-plugin-jest": "^21.6.2",
    "eslint-plugin-jsx-a11y": "^6.0.2",
    "eslint-plugin-react": "^7.5.1",
    "eslint-plugin-react-native": "^3.1.0",
    "extract-text-webpack-plugin": "^3.0.2",
    "html-loader": "^0.5.1",
    "html-minifier": "^3.4.3",
    "html-webpack-plugin": "^2.28.0",
    "identity-obj-proxy": "^3.0.0",
    "jest": "21.2.1",
    "jest-cli": "^21.2.1",
    "jsdom": "^11.9.0",
    "jsdom-global": "^3.0.2",
    "postcss": "^6.0.17",
    "postcss-cssnext": "^3.1.0",
    "postcss-import": "^11.0.0",
    "postcss-loader": "^2.0.10",
    "precss": "^3.1.0",
    "react-hot-loader": "^4.1.2",
    "redux-devtools": "^3.4.1",
    "redux-devtools-dock-monitor": "^1.1.3",
    "redux-devtools-extension": "^2.13.0",
    "redux-devtools-log-monitor": "^1.4.0",
    "redux-mock-store": "^1.4.0",
    "style-loader": "^0.19.0",
    "webpack-bundle-analyzer": "^2.11.0",
    "webpack-hot-server-middleware": "^0.4.0"
  },
  "browserslist": [
    ">1%",
    "last 2 versions"
  ]
}```

I tried that buffer fix already, as it was suggested above. No luck. We use npm, emulate on an iPhone 8 Plus, I'm on Sierra 10.13.4, and here's our package.json:
{
  "name": "PROJECT_NAME",
  "version": "0.0.1",
  "private": true,
  "jest": {
    "preset": "react-native",
    "verbose": true,
    "collectCoverage": true,
    "collectCoverageFrom": [
      "Common/**/*.{js|jsx}",
      "Web/src/js/**/*.{js|jsx}",
      "!**/node_modules/**",
      "!**/constants.js",
      "!**/appConfig.js",
      "!**/env.json",
      "!Common/env.json",
      "!Common/awsConfig.js",
      "!Common/reducers/root-reducer.js",
      "!Common/stores/*.js",
      "!Common/actions/clients.js"
    ],
    "testPathIgnorePatterns": [
      "/(node_modules|scripts)/"
    ],
    "setupFiles": [
      "./__mocks__/setup.js"
    ],
    "transform": {
      "^.+\\.js?$": "babel-jest"
    },
    "coverageThreshold": {
      "global": {
        "branches": 80,
        "functions": 80,
        "lines": 80,
        "statements": 80
      }
    },
    "moduleNameMapper": {
      "\\.(css|less)$": "identity-obj-proxy"
    },
    "moduleDirectories": [
      "node_modules",
      "Common"
    ],
    "testEnvironment": "jsdom"
  },
  "scripts": {
    // etc
  },
  "dependencies": {
    "aws-amplify": "^0.4.1",
    "aws-amplify-react": "^0.1.47",
    "axios": "^0.17.1",
    "babel-loader": "^7.1.2",
    "babel-plugin-add-module-exports": "^0.2.1",
    "babel-plugin-react-html-attrs": "^2.0.0",
    "babel-plugin-transform-class-properties": "^6.24.1",
    "babel-plugin-transform-decorators-legacy": "^1.3.4",
    "babel-plugin-universal-import": "^2.0.0",
    "babel-polyfill": "^6.26.0",
    "babel-preset-es2015": "^6.24.1",
    "babel-preset-react": "^6.24.1",
    "babel-preset-stage-0": "^6.24.1",
    "css-loader": "^0.28.7",
    "events": "^1.1.1",
    "express": "^4.16.2",
    "express-robots": "^0.1.6",
    "extract-css-chunks-webpack-plugin": "^2.0.18",
    "history": "^4.7.2",
    "json-loader": "^0.5.4",
    "jwt-decode": "^2.2.0",
    "lodash": "^4.17.4",
    "moment": "^2.19.2",
    "moment-timezone": "^0.5.13",
    "morgan": "^1.9.0",
    "paypal-checkout": "^4.0.199",
    "prop-types": "^15.6.0",
    "raven-js": "^3.24.2",
    "react": "^16.2.0",
    "react-autosuggest": "^9.3.2",
    "react-burger-menu": "^2.4.2",
    "react-country-region-selector": "^1.2.3",
    "react-dom": "16.1.1",
    "react-ga": "^2.5.0",
    "react-helmet": "^5.2.0",
    "react-image-magnify": "^2.3.2",
    "react-lazyload": "^2.2.8",
    "react-lifecycles-compat": "^3.0.4",
    "react-metrics": "^2.4.1",
    "react-moment": "^0.6.8",
    "react-native": "0.50.3",
    "react-native-code-push": "^5.2.0-beta",
    "react-native-fast-image": "^2.0.1",
    "react-native-orientation": "^3.1.3",
    "react-native-photo-view": "1.5.2",
    "react-native-swiper": "^1.5.4",
    "react-native-vector-icons": "^4.4.2",
    "react-redux": "5.0.6",
    "react-router-config": "^1.0.0-beta.4",
    "react-router-dom": "^4.2.2",
    "react-scroll": "^1.7.7",
    "react-slick": "^0.19.0",
    "react-stripe-elements": "^1.6.0",
    "react-toastify": "^3.0.0",
    "react-universal-component": "^2.8.3",
    "react-virtualized": "^9.18.5",
    "redux": "3.7.2",
    "redux-action-buffer": "^1.1.0",
    "redux-logger": "^3.0.1",
    "redux-persist": "^5.4.0",
    "redux-thunk": "^2.2.0",
    "uuid": "^3.1.0",
    "validator": "^9.4.1",
    "webpack": "^3.8.1",
    "webpack-dev-server": "^2.11.1",
    "webpack-flush-chunks": "^1.2.3",
    "webpack-hot-middleware": "^2.21.0",
    "whatwg-fetch": "^2.0.4"
  },
  "devDependencies": {
    "axios-mock-adapter": "^1.15.0",
    "babel-core": "^6.24.1",
    "babel-eslint": "^8.0.2",
    "babel-jest": "^21.2.0",
    "babel-plugin-dual-import": "^1.2.1",
    "babel-plugin-module-resolver": "^3.0.0",
    "babel-plugin-transform-runtime": "^6.23.0",
    "babel-preset-env": "^1.6.1",
    "babel-preset-react-native": "^4.0.0",
    "babel-preset-stage-2": "^6.24.1",
    "enzyme": "^3.3.0",
    "enzyme-adapter-react-16": "^1.1.1",
    "enzyme-to-json": "^3.3.3",
    "eslint": "^4.11.0",
    "eslint-config-airbnb": "^16.1.0",
    "eslint-config-airbnb-base": "^12.1.0",
    "eslint-plugin-import": "^2.2.0",
    "eslint-plugin-jest": "^21.6.2",
    "eslint-plugin-jsx-a11y": "^6.0.2",
    "eslint-plugin-react": "^7.5.1",
    "eslint-plugin-react-native": "^3.1.0",
    "extract-text-webpack-plugin": "^3.0.2",
    "html-loader": "^0.5.1",
    "html-minifier": "^3.4.3",
    "html-webpack-plugin": "^2.28.0",
    "identity-obj-proxy": "^3.0.0",
    "jest": "21.2.1",
    "jest-cli": "^21.2.1",
    "jsdom": "^11.9.0",
    "jsdom-global": "^3.0.2",
    "postcss": "^6.0.17",
    "postcss-cssnext": "^3.1.0",
    "postcss-import": "^11.0.0",
    "postcss-loader": "^2.0.10",
    "precss": "^3.1.0",
    "react-hot-loader": "^4.1.2",
    "redux-devtools": "^3.4.1",
    "redux-devtools-dock-monitor": "^1.1.3",
    "redux-devtools-extension": "^2.13.0",
    "redux-devtools-log-monitor": "^1.4.0",
    "redux-mock-store": "^1.4.0",
    "style-loader": "^0.19.0",
    "webpack-bundle-analyzer": "^2.11.0",
    "webpack-hot-server-middleware": "^0.4.0"
  },
  "browserslist": [
    ">1%",
    "last 2 versions"
  ]
}

@Megajin yeah sure. Feel free to reopen it.
@AceNorth could you give a try with yarn? Also for now aws-amplify targets the version of aws-sdk to 2.198.0, please make sure you are using the correct version.

@powerful23

Also for now aws-amplify targets the version of aws-sdk to 2.198.0, please make sure you are using the correct version.

Can you clarify? We're not using aws-sdk directly, it's only being installed as a dependency of aws-amplify. So I have no control over which version is being used.

@AceNorth I mean if you are only using amplify, then the version of aws-sdk should be 2.198.0. By the way, what' the version of amazon-cognito-identity-js?

@powerful23 2.0.3

@powerful23 I wish I could, but I can't because you closed the issue and I am not a Contributor.

@Megajin We're using expo and haven't ejected our app (yet) and wouldn't do so just to get functionality here, so... can't follow those steps unfortunately.

@AndrewSouthpaw, @AceNorth
Have you both tried to install the AWS Mobile React Native Starter App - Serverless Pet Tracker?
I used it to look for differences in my project and did somehow get it to work then. Anything could be useful here like: Is this happening on Android only or iOS as well. Which differences occur in those folders as well? As I mentioned my problem dissapeared after upgrading gradle and deleting all caches, but I guess that won't be the cure for all problems. Since @AndrewSouthpaw mentioned expo that could be an issue as well but I'm not entirely sure.
I had another issue with another library the solution there was to remove my emulated devices and do an update. I should mention as well that I changed some of the SDK dependencies (react-native needs 23 but that didn't work in my project because I needed some of Google Firebase dependencies as well...), here is my source maybe it helps:
android\settings.gradle
rootProject.name = 'APPNAME'

include ':app'
include ':react-native-vector-icons'
project(':react-native-vector-icons').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-vector-icons/android')
include ':react-native-firebase'
project(':react-native-firebase').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-firebase/android')
include ':react-native-fetch-blob'
project(':react-native-fetch-blob').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-fetch-blob/android')
include ':aws-amplify-react-native'
project(':aws-amplify-react-native').projectDir = new File(rootProject.projectDir, '../node_modules/aws-amplify-react-native/android')
include ':amazon-cognito-identity-js'
project(':amazon-cognito-identity-js').projectDir = new File(rootProject.projectDir, '../node_modules/amazon-cognito-identity-js/android')

android\build.gradle
// Top-level build file where you can add configuration options common to all sub-projects/modules.

buildscript {
    repositories {
        jcenter()
        google()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:3.1.0'
        classpath 'com.google.gms:google-services:3.2.1'
        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
    }
}

allprojects {
    repositories {
        mavenLocal()
        jcenter()
        maven {
            // All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
            url "$rootDir/../node_modules/react-native/android"
        }
        google()
    }
}

android\gradle\wrapper\gradle-wrapper.properties
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-4.4-all.zip

android\app\build.gradle
apply plugin: "com.android.application"

import com.android.build.OutputFile

project.ext.react = [
    entryFile: "index.js"
]

apply from: "../../node_modules/react-native/react.gradle"

/**
 * Set this to true to create two separate APKs instead of one:
 *   - An APK that only works on ARM devices
 *   - An APK that only works on x86 devices
 * The advantage is the size of the APK is reduced by about 4MB.
 * Upload all the APKs to the Play Store and people will download
 * the correct one based on the CPU architecture of their device.
 */
def enableSeparateBuildPerCPUArchitecture = false

/**
 * Run Proguard to shrink the Java bytecode in release builds.
 */
def enableProguardInReleaseBuilds = false

android {
    compileSdkVersion 25
    buildToolsVersion "25.0.1"

    defaultConfig {
        applicationId "com.APPNAME"
        minSdkVersion 16
        targetSdkVersion 25
        versionCode 1
        versionName "1.0"
        ndk {
            abiFilters "armeabi-v7a", "x86"
        }
    }
    splits {
        abi {
            reset()
            enable enableSeparateBuildPerCPUArchitecture
            universalApk false  // If true, also generate a universal APK
            include "armeabi-v7a", "x86"
        }
    }
    buildTypes {
        release {
            minifyEnabled enableProguardInReleaseBuilds
            proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro"
        }
    }
    // applicationVariants are e.g. debug, release
    applicationVariants.all { variant ->
        variant.outputs.each { output ->
            // For each separate APK per architecture, set a unique version code as described here:
            // http://tools.android.com/tech-docs/new-build-system/user-guide/apk-splits
            def versionCodes = ["armeabi-v7a":1, "x86":2]
            def abi = output.getFilter(OutputFile.ABI)
            if (abi != null) {  // null for the universal-debug, universal-release variants
                output.versionCodeOverride =
                        versionCodes.get(abi) * 1048576 + defaultConfig.versionCode
            }
        }
    }
}

dependencies {
implementation fileTree(dir: "libs", include: ["*.jar"])
implementation "com.android.support:appcompat-v7:25.0.1"
// Firebase dependencies
implementation(project(':react-native-firebase')) {
    transitive = false
}
implementation "com.google.android.gms:play-services-base:15.0.0"
implementation "com.google.firebase:firebase-core:15.0.2"
implementation "com.facebook.react:react-native:+"  // From node_modules
implementation project(':aws-amplify-react-native')
implementation project(':amazon-cognito-identity-js')
implementation project(':react-native-fetch-blob')
implementation project(':react-native-vector-icons')
}

// Run this once to be able to run the application with BUCK
// puts all compile dependencies into folder libs for BUCK to use
task copyDownloadableDepsToLibs(type: Copy) {
    from configurations.compile
    into 'libs'
}

// Must be last to prevent version conflict error at build.
apply plugin: 'com.google.gms.google-services'

`android\app\src\main\java\com\APPNAME\MainActivity.java`
```Java
package com.APPNAME;

import com.facebook.react.ReactActivity;

public class MainActivity extends ReactActivity {

    /**
     * Returns the name of the main component registered from JavaScript.
     * This is used to schedule rendering of the component.
     */
    @Override
    protected String getMainComponentName() {
        return "APPNAME";
    }
}

`android\app\src\main\java\com\APPNAME\MainApplication.java`
```Java
package com.APPNAME;

import android.app.Application;

import com.facebook.react.ReactApplication;
import com.oblador.vectoricons.VectorIconsPackage;
import io.invertase.firebase.RNFirebasePackage;
import com.RNFetchBlob.RNFetchBlobPackage;
import com.amazonaws.amplify.pushnotification.RNPushNotificationPackage;
import com.amazonaws.RNAWSCognitoPackage;
import com.facebook.react.ReactNativeHost;
import com.facebook.react.ReactPackage;
import com.facebook.react.shell.MainReactPackage;
import com.facebook.soloader.SoLoader;

import java.util.Arrays;
import java.util.List;

public class MainApplication extends Application implements ReactApplication {

  private final ReactNativeHost mReactNativeHost = new ReactNativeHost(this) {
    @Override
    public boolean getUseDeveloperSupport() {
      return BuildConfig.DEBUG;
    }

    @Override
    protected List<ReactPackage> getPackages() {
      return Arrays.<ReactPackage>asList(
          new MainReactPackage(),
            new VectorIconsPackage(),
            new RNFirebasePackage(),
            new RNFetchBlobPackage(),
            new RNPushNotificationPackage(),
            new RNAWSCognitoPackage()
      );
    }

    @Override
    protected String getJSMainModuleName() {
      return "index";
    }
  };

  @Override
  public ReactNativeHost getReactNativeHost() {
    return mReactNativeHost;
  }

  @Override
  public void onCreate() {
    super.onCreate();
    SoLoader.init(this, /* native exopackage */ false);
  }
}

Since I am developing for Android only this is all I can provide.
If you guys could post some more of your environment then @powerful23 and @elorzafe can reproduce it better and debug to pinpoint the problem.

Guys,
the error occured again and again from time to time. I really do not know why.
However I did some investigation on this:
global.TYPED_ARRAY_SUPPORT will always be undefined. At least in my case.
In my code I did try this:
global.Buffer = global.Buffer || require('buffer').Buffer; // Required for aws sigv4 signing
global.TYPED_ARRAY_SUPPORT = global.TYPED_ARRAY_SUPPORT || global.Buffer.TYPED_ARRAY_SUPPORT;

Still the same error again. So I went and cloned the amplifyJs repository.
Searching through the ./packages/ folder I did find s.TYPED_ARRAY_SUPPORT in the file ./packages/amazon-cognito-identity-js/dist/amazon-cognito-identity.js.
Without going into detail this error was somehow familiar, because I did remember that the same thing once happened to me in combination with Webpack together with Babel. The cause was that the Babel preset using --presets es2015. Since it is only to be found in the under the distribution folder I'm highly positive that it has something to do with the preset in combination with a bundler since I could not find TYPED_ARRAY_SUPPORT in any other file.
For example I'm using this in my .babelrc:
{
  "presets": ["env",  "react-native"]
}

The amplifyJs ./packages/amazon-cognito-identity-js/.babelrc is using this:
{
  "presets": [
    [
      "es2015", {
        "loose": true,
        "modules": false
      }
    ]
  ],
  "env": {
    "commonjs": {
      "plugins": [
        ["transform-es2015-modules-commonjs", { "loose": true }]
      ]
    }
  }
}

Is it possible that this could solve this issue? Like changing the babel preset?

@Megajin We eventually fixed this by removing the "env" preset from our .babelrc, so yes, it seems like that was the issue.

Ok, after some testing today I can confirm that Error: evaluating 'global.TYPED_ARRAY_SUPPORT' is 100% caused by babel --presets env in combination with amazon-cognito-identity.js.
I did change this:
{
  "presets": ["env",  "react-native"]
}

To this:
{
  "presets": ["react-native"]
}

Thanks to @AceNorth for confirming this.
Remember to completley rebuild your app and remove all temporary files to be clean:

remove all from C:\Users\Megajin\AppData\Local\Temp.
remove the folder node_modules .
install all packages with npm install --no-optional.
In current windows console: set RNFB_ANDROID_PERMISSIONS=true (this is for the current session so I can link react-native-fetch-blob).
react-native link

I guess the Issue can be closed as resolved @powerful23 @elorzafe
You guys might find this useful too: @paul-doherty @AndrewSouthpaw @michalziolkowski


Use Blazor just for client side C# code in place of JavaScript (no UI)

I don't know if this is already possible or not, but could Blazor be used just for getting C# working as client-side code in place of JavaScript, while keeping the regular html / css rendering?
If I could preempt one comment: No, I'm not trying to replace every day little client-side javascript, but for more significant use cases.
Here's one example: See this blazedown experiment. Like him, I happen to be using MarkDig on the backend to render markdown, while for the ongoing preview while client types, I make calls to the backend every half second etc to render an html preview panel of the document (yes, I could use, as I did originally, one of the javascript based MD renderers, but without going into details, this way gives me consistent and better results to what I'm doing on the backend for rendering). It would be terrific if MarkDig could be compiled and used client-side with Blazor, using whatever it does to get .NET working with webassembly on the client, without replacing the UI. So I'm envisioning a way to probably use javascript to call functions in the webassembly / blazor .NET code. Or is that just not possible?
Thanks y'all

could Blazor be used just for getting C# working as client-side code in place of JavaScript, while keeping the regular html / css rendering?

Yes, that's exactly what Blazor enables.

See this blazedown experiment. Like him, I happen to be using MarkDig on the backend to render markdown

Actually, I don't think that's what BlazeDown does. BlazeDown doesn't make server requests to do the markdown to HTML conversion. Instead, BlazeDown uses MarkDig to render the markdown into HTML directly in the browser. This is possible because Blazor supports .NET Standad libraries.

It would be terrific if MarkDig could be compiled and used client-side with Blazor, using whatever it does to get .NET working with webassembly on the client, without replacing the UI

Yup, that's basically what BlazeDown demonstrates. There are some rough edges. For example we don't have support yet for rendering raw HTML from a Blazor component yet (#167), so BlazeDown had to do some hacks. Also, Blazor is really intended to be used for your entire app, not individual widgets. But otherwise Blazor matches up pretty well to what you are asking for.
See https://blazor.net to learn more.

Thanks for the response! I'm very encouraged to hear this. My impression thus far was that Blazor replaces the entire UI using Razor code somehow compiled to display as html, which to be clear is awesome... but it wasn't so clear you could use this just to get the C# "scripting" part (better yet: real object oriented C# "coding" with full .NET libraries!) but while using just plain html/css otherwise. The homepage states: "Build a Web UI with C#" - and most articles thus far focused on razor (even the one I referenced, the part about it being hackish to display html, I probably misunderstood that as referring to all html displaying, I guess now he might have just meant for the final markdig-to-html injection part). Anyways, looks like I just need to go try one of these demos myself to clear up misconceptions I had.
One clarification, I worded this poorly, but when I said: "Like him, I happen to be using MarkDig on the backend to render markdown", what I meant to say was just that I am also using Markdig for this conversion, mine though being on the backend, the whole point being I would love it to be client side.

My impression thus far was that Blazor replaces the entire UI using Razor code somehow compiled to display as html, which to be clear is awesome... but it wasn't so clear you could use this just to get the C# "scripting" part (better yet: real object oriented C# "coding" with full .NET libraries!) but while using just plain html/css otherwise

Hmm . . . maybe I'm misunderstanding the distinction your making. In Blazor you do use Razor files (.cshtml) to define what HTML you want rendered. The Razor files get compiled into Blazor component classes that capture the HTML to render and Blazor handles updating the DOM accordingly. So you can't just type some C# into an HTML file and have that somehow get interpreted in the browser - the process is more like how systems like React work. Does that make sense?

So you can't just type some C# into an HTML file and have that somehow get interpreted in the browser

Ah, ok, so it sounds like the answer to my question is no.
I wonder why not though. It would be cool to have netstandard assemblies compiled to a webassembly format (perhaps doing some of the same things Blazor does) that could be called let's say from a javascript function, so then the javascript function is just used to make the initial call into the webassembly code / which happens to originally have been C#). It seems like Blazor does even more than this by providing a whole (awesome) UI razor framework, so I assumed / hoped a more minimal use case could be done. To run C# code in webassembly as a javascript replacement (in certain use cases, to be clear).

Blazor sits on top of mono/wasm which provides the .net runtime in the browser. You don’t have to use Blazor to get c# in the browser, but it might take a lot of work to do it all yourself. Give it a try
Sent with GitHawk


Stack failed to create

BUG REPORT INFO
TASK [Running the OpenStack install] *******************************************
task path: /home/slave2/workspace/mbruzek-start-scale-ci/openshift_on_openstack.yml:188
Tuesday 31 October 2017  20:26:01 +0000 (0:00:00.093)       1:04:58.839 *******
fatal: [<IP_ADDRESS>]: FAILED! => {"changed": true, "cmd": "source /home/cloud-user/keystonerc; ansible-playbook -vvv openshift-ansible-contrib/playbooks/provisioning/openstack/provision.yaml 2>&1 > openstack_provision_log.txt", "delta": "0:05:08.566114", "end": "2017-10-31 16:31:12.631030", "failed": true, "rc": 2, "start": "2017-10-31 16:26:04.064916", "stderr": "", "stderr_lines": [], "stdout": " [WARNING]: provided hosts list is empty, only localhost is available", "stdout_lines": [" [WARNING]: provided hosts list is empty, only localhost is available"]}

The full traceback is:
Traceback (most recent call last):
  File "/tmp/ansible_KqGEtA/ansible_module_os_stack.py", line 273, in <module>
    main()
  File "/tmp/ansible_KqGEtA/ansible_module_os_stack.py", line 258, in main
    id=stack.id)
AttributeError: 'bool' object has no attribute 'id'

stack_status          | CREATE_FAILED
stack_status_reason   | Resource CREATE failed: ResourceInError: resources.infra_nodes.resources[0].resources.server: Went to status ERROR due to "Message: 'NoneType' object is not iterable,  Code: 500"

Environment

Cloud provider:  OpenStack

OS details (printf "$(uname -srm)\n$(cat /etc/os-release)\n"):

        "Linux 3.10.0-757.el7.x86_64 x86_64",
        "NAME=\"Red Hat Enterprise Linux Server\"",
        "VERSION=\"7.4 (Maipo)\"",
        "ID=\"rhel\"",
        "ID_LIKE=\"fedora\"",
        "VARIANT=\"Server\"",
        "VARIANT_ID=\"server\"",
        "VERSION_ID=\"7.4\"",
        "PRETTY_NAME=\"Red Hat Enterprise Linux Server 7.4 (Maipo)\"",
        "ANSI_COLOR=\"0;31\"",
        "CPE_NAME=\"cpe:/o:redhat:enterprise_linux:7.4:GA:server\"",
        "HOME_URL=\"https://www.redhat.com/\"",
        "BUG_REPORT_URL=\"https://bugzilla.redhat.com/\"",
        "",
        "REDHAT_BUGZILLA_PRODUCT=\"Red Hat Enterprise Linux 7\"",
        "REDHAT_BUGZILLA_PRODUCT_VERSION=7.4",
        "REDHAT_SUPPORT_PRODUCT=\"Red Hat Enterprise Linux\"",
        "REDHAT_SUPPORT_PRODUCT_VERSION=\"7.4\""

Version of Ansible (ansible --version):  <IP_ADDRESS>

Version of Jinja (pip freeze | grep -i jinja):  2.7.2

Version of Shade (pip freeze | grep -i shade):  1.24.0

The openstack-ansible-contrib version (commit) (git rev-parse --short HEAD):  a9830cb

Copy of inventory files and custom variables used (please omit your secrets!):
Command used to invoke ansible:
source /home/cloud-user/keystonerc; ansible-playbook -vvv openshift-ansible-contrib/playbooks/provisioning/openstack/provision.yaml 2>&1 > openstack_provision_log.txt
Output of ansible run:
https://gist.github.com/mbruzek/ac729707a83096851c50b9449d410776
Anything else do we need to know:
I ran openstack stack show scale-ci.example.com and it tells me:
+-----------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| Field                 | Value                                                                                |
+-----------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| id                    | 1f8ab646-3d77-4e14-9849-ab81821c87c4                                                                                |
| stack_name            | scale-ci.example.com                                                                                |
| description           | OpenShift cluster                                                                                |
| creation_time         | 2017-10-31T20:26:45Z                                                                                |
| updated_time          | None                                                                                |
| stack_status          | CREATE_FAILED                                                                                |
| stack_status_reason   | Resource CREATE failed: ResourceInError: resources.infra_nodes.resources[0].resources.server: Went to status ERROR due to "Message: 'NoneType' object is not iterable,  |
|                       | Code: 500"                                                                                |
| parameters            | OS::project_id: 508d3035cc2b4c9f9d154302afd03ff2                                                                                |
|                       | OS::stack_id: 1f8ab646-3d77-4e14-9849-ab81821c87c4                                                                                |
|                       | OS::stack_name: scale-ci.example.com
| outputs               | - description: Floating IPs of the etcds                                                                                |
|                       |   output_key: etcd_floating_ips                                                                                |
|                       |   output_value: []                                                                                |
|                       | - description: Floating IPs of the masters                                                                                |
|                       |   output_key: master_floating_ips                                                                                |
|                       |   output_value:                                                                                |
|                       |   - null                                                                                |
|                       |   - null                                                                                |
|                       |   - null                                                                                |
|                       | - description: Private IPs of the DNS                                                                                |
|                       |   output_key: dns_private_ips                                                                                |
|                       |   output_value:                                                                                |
|                       |   - <IP_ADDRESS>                                                                                |
|                       | - description: IPs of the etcds                                                                                |
|                       |   output_key: etcd_ips                                                                                |
|                       |   output_value: []                                                                                |
|                       | - description: IPs of the masters                                                                                |
|                       |   output_key: master_ips                                                                                |
|                       |   output_value:                                                                                |
|                       |   - null                                                                                |
|                       |   - null                                                                                |
|                       |   - null                                                                                |
|                       | - description: IPs of the nodes                                                                                |
|                       |   output_key: infra_ips                                                                                |
|                       |   output_value:                                                                                |
|                       |   - null                                                                                |
|                       |   - null                                                                                |
|                       |   - null                                                                                |
|                       | - description: Name of the nodes                                                                                |
|                       |   output_key: infra_names                                                                                |
|                       |   output_value:                                                                                |
|                       |   - infra-node-0.scale-ci.example.com                                                                                |
|                       |   - infra-node-1.scale-ci.example.com                                                                                |
|                       |   - infra-node-2.scale-ci.example.com                                                                                |
|                       | - description: Floating IPs of the DNS                                                                                |
|                       |   output_key: dns_floating_ips                                                                                |
|                       |   output_value:                                                                                |
|                       |   - <IP_ADDRESS>                                                                                $
|                       | - description: Name of the nodes
|                       | - description: Name of the nodes                                                                                |
|                       |   output_key: node_names                                                                                |
|                       |   output_value:                                                                                |
|                       |   - app-node-0.scale-ci.example.com                                                                                |
|                       |   - app-node-1.scale-ci.example.com                                                                                |
|                       | - description: Floating IPs of the nodes                                                                                |
|                       |   output_key: node_floating_ips                                                                                |
|                       |   output_value:                                                                                |
|                       |   - <IP_ADDRESS>                                                                                |
|                       |   - <IP_ADDRESS>                                                                                |
|                       | - description: Name of the DNS                                                                                |
|                       |   output_key: dns_name                                                                                |
|                       |   output_value:                                                                                |
|                       |   - dns-0.scale-ci.example.com                                                                                |
|                       | - description: Name of the etcds                                                                                |
|                       |   output_key: etcd_names                                                                                |
|                       |   output_value: []                                                                                |
|                       | - description: Floating IPs of the nodes                                                                                |
|                       |   output_key: infra_floating_ips                                                                                |
|                       |   output_value:                                                                                |
|                       |   - null                                                                                |
|                       |   - null                                                                                |
|                       |   - null                                                                                |
|                       | - description: IPs of the nodes                                                                                |
|                       |   output_key: node_ips                                                                                |
|                       |   output_value:                                                                                |
|                       |   - <IP_ADDRESS>                                                                                |
|                       |   - <IP_ADDRESS>                                                                                |
|                       | - description: Name of the masters                                                                                |
|                       |   output_key: master_names                                                                                |
|                       |   output_value:                                                                                |
|                       |   - master-0.scale-ci.example.com                                                                                |
|                       |   - master-1.scale-ci.example.com                                                                                |
|                       |   - master-2.scale-ci.example.com                                                                                |
|                       |                                                                                |
| links                 | - href: http://<IP_ADDRESS>:8004/v1/508d3035cc2b4c9f9d154302afd03ff2/stacks/scale-ci.example.com/1f8ab646-3d77-4e14-9849-ab81821c87c4                                    |
|                       |   rel: self                                                                                |
|                       |                                                                                |
| parent                | None                                                                                |
| disable_rollback      | True                                                                                |
| deletion_time         | None                                                                                |
| stack_user_project_id | 83af886bb1794caa8f040fd87a14be4c                                                                                |
| capabilities          | []                                                                                |
| notification_topics   | []                                                                                $
| stack_owner           | None                                                                                $
| timeout_mins          | 60                                                                                $
| tags                  | None                                                                                $
+-----------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------$

I found an error in the heat-engine.log
https://gist.github.com/mbruzek/c6e19f48b1e71720f5284aeefdb62f82

When I patched the OpenStack controllers with https://github.com/openstack/nova/commit/9d6632a67d91fb3c5145c14ac38011e919d6d8c0, I was able to get past this issue.
A bugzilla issue was created here: https://bugzilla.redhat.com/show_bug.cgi?id=1510155
I would ask if someone on the contrib team could take a look and see if the code is doing anything with instance_group.members that we could avoid for versions of OpenStack that are not patched with this fix.

Thanks for digging into this! As far as I can tell, there's not much we can do about this.
We might want to point it out in the readme or a debugging guide, though.


Run automated tests with SQLite to speed up local testing

We've removed this via https://github.com/silverstripe/silverstripe-framework/commit/c47a1d9091c4cba52109c7fa9d9a46ac57d4ea93 with the rationale that we don't run SQLite in production, and that it delays builds in our constrained free Travis builder allocation.
There's been a recent push in our product teams to test using https://github.com/silverstripe/cwp-recipe-kitchen-sink with a full combination of modules. This makes unit tests extremely slow. There's other ways to improve that, but the quickest win is to run them via in-memory SQLite. At the moment, a dev doing local development can either choose to write code in kitchen sink, which is good enough for manual regression testing, and discovering side effects from other modules. Or they optimise for TDD and local test execution speed, in which case running the kitchen sink is less feasible.
I'm keen for devs to use a fast way of local testing, which encourages writing more tests, and also avoids expensive context switches when a full test suite fails on Travis hours after you've thought about that piece of code.
In order to achieve this, I'm recommending that we add SQLite as nightly builds to the kitchen sink: https://github.com/silverstripe/cwp-recipe-kitchen-sink/blob/master/.travis.yml. This would further use up our builder capacity in Travis, and potentially time out the entire build. @robbieaverill Do you know how long a Travis build can run in total, or if there are limitations on how many build jobs it can run?

Do you know how long a Travis build can run in total, or if there are limitations on how many build jobs it can run?

I think it's about 40-45 minutes per job. We have 15 jobs on the kitchen sink, I'm not sure what the limit is there though, but you get about 5 concurrent jobs. Both statements are referring to the free version.

Just came across this issue in my local dev env.
I couldn't run local framework tests using SQLite database and it seems Travis would be broken as well.
Getting an error where Injector can't create the db class:
Uncaught SilverStripe\Core\Injector\InjectorNotFoundException: ReflectionException: Class SQLite3PDODatabase does not exist in /github/silverstripe-framework/src/Core/Injector/InjectionCreator.php:17

Followed what Travis is doing and ran
composer require silverstripe/recipe-testing:^1 silverstripe/recipe-core:4.4.x-dev
composer require silverstripe/sqlite3:2.0.x-dev, tried also 2.2.x-dev with no luck
Not sure if this is somehow related to https://github.com/silverstripe/silverstripe-sqlite3/issues/53 as well.

That shouldn't happen.
https://github.com/silverstripe/silverstripe-sqlite3/blob/2/_config/connectors.yml#L5
The linked issue sees the tests run @michalkleiner - just not from memory (as they're supposed to).

Created a temp branch to check SQLite build in Travis
https://travis-ci.org/silverstripe/silverstripe-framework/jobs/582996761

Failed on something else though, will give a local fresh test another go.

After merging in https://github.com/silverstripe/silverstripe-framework/pull/9234 the SQLite tests now run.

Thanks for fixing the SQLite builds @michalkleiner.

My main issue with using SQLite in general for unit tests is that it doesn't represent a realistic environment for testing in, since people don't usually use SQLite in production sites. I'd rather focus on improving the test harness so you can easily isolate the database and run actual unit tests, in order to improve the test run time.
-1 from me, sorry!

I agree with everything @robbieaverill just said.

I'm keen for devs to use a fast way of local testing, which encourages writing more tests, and also avoids expensive context switches when a full test suite fails on Travis hours after you've thought about that piece of code.

I would suggest we invest the effort into adopting paratest or something alike, rather than trying to make the rdbms faster.

I'm keen for devs to use a fast way of local testing, which encourages writing more tests, and also avoids expensive context switches when a full test suite fails on Travis hours after you've thought about that piece of code.

I would suggest we invest the effort into adopting paratest or something alike, rather than trying to make the rdbms faster.

Well finding the right balance seems the open topic.
To me 'make the rdbms faster' seems a quick fix, requiring no further effort and is ready for use NOW, while ' adopting paratest or something alike' seems to be the right mid- to long term goal but will require considerable time, hence longer lead time before we can harvest the benefits.
Just my 5 cent ;-)

Fair enough. On the other hand, I'm not completely sure SQLite is ready for use and requires no further effort. It's definitely available for local test runs already. However, I doubt it will be green everywhere out of the box if we start running it for all modules on CI.

I'm a -1 on this too. Although we could probably encourage an in-memory SQLite config for local development where speed is important, when on CI, the speed isn't so much of a factor. Better for CI to more closely represent your production environment.
In terms of SQLite on module repos, I'm definitely not against trying to bring SQLite into the list of properly supported DB adapters - which is what the intent of this issue would require anyway. If we do that, then putting SQLite on a build in our travis configs makes sense.

Yeah this is a tough one. We're trying to limit rather than expand the module surface that we support, so to that end we probably shouldn't add SQLite builds to a supported recipe.
There's a few points which currently make testing harder than it should be in Silverstripe:

Too much coupling between the "business objects" and the ORM persistence layer makes it hard to test functionality without database = slow tests
Not enough devs know how to use mocks properly ;)
In our existing test harness, those two issues manifest by a lot of integration tests, and not enough true functional tests

Unfortunately the answer for those is "refactor almost everything" (e.g. separate business objects from persistence in the ORM, DataMapper rather than ActiveRecord pattern). Which is not achievable in a reasonable timeframe for devs who want to follow test-driven development practices.
I've been thinking about an additional benefit of SQLite in terms of an easier onboarding experience: With SQlite installed (e.g. on OSX), you could get Silverstripe going through a simple php -S without any other mucking around with LAMP. But that's less relevant in a world of cloud providers and containers now as well.
So in conclusion, I don't see us increasing our current level of investment in SQLite to the extent that it would make it feasible what I originally suggested in this issue, hence closing it.


Fixes Connection Reuse for Ember Client

Fixes #3592
First Error Discovered: When we are actually able to reuse a connection it was draining the root stream of extra bytes. As we had listed to take 2060 bytes, and then with the same reference try to pull 2060 more bytes as the effect was executed in the use block. This hung waiting for new bytes. (This signals to me that the user has a hold of the root connection not only a handle of 2060 bytes worth of it as pulling twice tries to take that twice, unsure if we should do something or how to do something that separates that logic). This means as well that a partially consumed stream will trigger the finalizers for reuse but the underlying stream will have however many bytes are uncomsumed present. We could add something that measures how much is read and then read that on shutdown, but then that introduces a race condition between release and an asynchronous effect. I feel that this default is reasonable for now, but we may want to revisit it in the future.
When introducing the host logic, we created a way to write the Host header twice, as if it was present in the headers and the uri it was written twice. This is now fixed to only render a Host header from a Uri if it is not present in headers. This is how its done in blaze but feels pretty inefficient compared to my other methods here. (We were previously ok due to how headers ++ operated)

@BalmungSan if you can confirm this fixes the issue for you that would be great. Mine now runs infinitely.

@ChristopherDavenport I can confirm that using a local publish of this branch everything works fine!
Once again, thanks for all the hard work!
(@d2a4u you may want to know about this)

Amazing, thanks. I found this issue as well last night but was struggling to fix it by myself. Should have jumped on gitter sooner. Thanks.


Move Cromwell key to own dataset

I regret putting this in the analysis-runner project. Moving it should have no real consequence, except we'll update analysis-runner. This has been actioned when moving the cromwell code from analysis-runner to cromwell.
<will link PR when I create it>
Note: graphlib is moved, and will disappear when #211 is merged

Codecov Report
All modified and coverable lines are covered by tests :white_check_mark:

:exclamation: No coverage uploaded for pull request base (main@36006cb). Click here to learn what that means.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #212   +/-   ##
=======================================
  Coverage        ?   90.65%
=======================================
  Files           ?        4
  Lines           ?      428
  Branches        ?        0
=======================================
  Hits            ?      388
  Misses          ?       40
  Partials        ?        0

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.


OSVR Server Startup Crash

It looks like the crash is related to logging. I've reproduced this on three different Windows 10 machines. Sometimes it can be reproduced frequently, other times it is harder to reproduce. It sometimes happens with server-autostart, where a 2nd server instance starts up and crashes immediately rather than exiting. But it also occurs sometimes when no server is running initially. To reproduce, try starting the server until it crashes.

Haven't gotten anything useful out of debugging, but I will update with more info.

I have exactly the same issue on Windows 10 Anniversary Update. Sometime it starts, sometime it fails.


Uncaught Error: ENOENT: no such file or directory

I'm getting this error as soon as I attempt to launch a task-board for my project, directly after a fresh install, so this hasn't worked for me at all.
Atom Version: 1.4.3
System: Mac OS X 10.11.3
Thrown From: imdone-atom package, v1.3.25
Stack Trace
Uncaught Error: ENOENT: no such file or directory, open '/Users/steven/Documents/Developd/developd-business-client/node_modules/asar/test/expected/packthis-unpack-dir.asar.unpacked/dir2/file3.txt'
At fs.js:549

Error: ENOENT: no such file or directory, open '/Users/steven/Documents/Developd/developd-business-client/node_modules/asar/test/expected/packthis-unpack-dir.asar.unpacked/dir2/file3.txt'
    at Error (native)
    at Object.fs.openSync (fs.js:549:18)
    at Object.module.(anonymous function) [as openSync] (ATOM_SHELL_ASAR.js:148:18)
    at Function.module.exports.sync (/Users/steven/.atom/packages/imdone-atom/node_modules/imdone-core/node_modules/read-chunk/index.js:34:14)
    at /Users/steven/.atom/packages/imdone-atom/node_modules/imdone-core/lib/mixins/repo-fs-store.js:104:31
    at ATOM_SHELL_ASAR.js:217:16
    at doNTCallback0 (node.js:419:9)
    at process._tickCallback (node.js:348:13)

Commands

Config
{
  "core": {
    "disabledPackages": [
      "remote-edit"
    ],
    "themes": [
      "one-dark-ui",
      "oceanic-next"
    ]
  },
  "imdone-atom": {
    "openIn": {},
    "todaysJournal": {}
  }
}

Installed Packages
# User
color-picker, v2.1.1
imdone-atom, v1.3.25
language-javascript-jsx, v0.3.7
linter, v1.11.3
linter-eslint, v6.0.0
linter-htmlhint, v1.0.2
linter-less, v2.4.0
linter-scss-lint, v2.5.1
minimap, v4.19.0
oceanic-next, v0.1.2
project-manager, v2.7.5
react, v0.14.1
react-es6-snippets, v0.3.0

# Dev
No dev packages

Is this still an issue?


Fixes for issues generating distribution tarball

Fixes to ensure that 'make dist' puts all of the files required for a successful build into the tarball.
Also, bump D-Bus and D-Bus GLib versions to 2.0 and lower minimum Mono version to 3.2 (for building on Debian Jessie / Sid).
Thanks.

I'm thinking I'm reading this wrong, but it looks like you want to merge this into mono:master and not f-spot:master?

I think I meant f-spot:master - sorry, not sure how that happened!

All pull requests for f-spot seem to be for mono:master? Unfortunately I've no prior experience of using GitHub for pull requests, so I don't know if this is normal?

Hmm, might just be a weird way that they are labeling it. It seems right looking at it closer. There is a merge conflict though. If you can rebase on master that'd be great. If you are not sure I can do it locally for you.

btw, we have a channel on https://gitter.im/mono/f-spot if you want to join us in there.

Okay, I think that's done now?

Awesome. That looks really good now. I'll pull the branch and test it out tonight.

I want to go back to the beginning of this issue:  "bump D-Bus and D-Bus GLib versions to 2.0."  I'm on Gentoo, and although I apparently have the latest versions of dbus-sharp (0.7.0) and dbus-sharp-glib (0.5.0) I see no mention of versions 2.0.  Am I missing something, or is this just a packaging issue I need to complain about to Gentoo?

The 2.0 refers to the API/ABI version rather than the version of the code. The API version was bumped from 1.0 to 2.0 in dbus-sharp 0.8 and dbus-sharp-glib 0.6 See https://github.com/mono/dbus-sharp/releases/tag/v0.8. Debian Wheezy packaged dbus-sharp 0.7 whereas Jessie onwards packages 0.8.1. I originally tried to bump the API version in a quilt patch (i.e. within the Debian package) but this introduced too many complications. I assumed other distributions would have moved to the newer dbus releases by now, so it seemed to make sense to increase the API number upstream.

http://mono.github.io/dbus-sharp (linked from http://github.com/mono/dbus-sharp) is apparently way out of date, as is http://github.com/mono/dbus-sharp/downloads.  However, it is not a safe assumption that all distros are fully updated.  I'll have to ping Gentoo.  It looks like Archlinux does have the latest.
I suppose creating the symlink only appears to work, and something would fail if I actually got f-spot running.

FYI: Mageia 5 still bundles v 0.5, so API version 1.0. So this merge request causes compilation to fail under the latest Mageia.

My thought would be that Mageia probably really needs to bump their dbus-sharp and dbus-sharp-glib library.
I'm starting to think that because deps are somewhat a nightmare that it might just be worth including our own copy of this code inside of f-spot.

But the thing is, the mono.github.io page says the latest release is 0.7/0.5 -> 1.0. And the autogen still checks only for dbus-sharp-glib-2.0 >= 0.5
the 2.0 API bump started at 0.8/0.6. 0.7/05 is still 1.0. So the dbus.m4 is not consistent.
I left a comment on the "bring back f-spot on mageia" bug about this change, not sure how it would impact other dependencies. Like mono-banshee. Unless they introduce a new "dbus-sharp-2.0" package and leave the 1.0 as is.
Not sure about including our copy of the code inside F-Spot. We do fork+patch Hyena at the moment, and I thought the idea was to be able to stop doing that. Anyways, that might be off topic.

I haven't got time to look into this right now, but might it be possible to modify  build/m4/f-spot/dbus.m4  and  src/Core/FSpot.Platform/FSpot.Platform.csproj  so that they will accept either the 1.0 or 2.0 API? F-Spot appears to compile against either. Including code from other projects within the tarball is likely to only further complicate any future attempts to package F-Spot for distributions.

Please don't bundle libraries - I've only seen it eventually cause headaches.  As far as I can tell, the two versions of dbus-sharp and dbus-sharp-glib could be both installed at the same time, so if f-spot can actually use either, then can the dependency simply not specify version?  I've already filed an issue (#47) with dbus-sharp about the out of date documentation on the web page.  However, depending on when you expect to package a release candidate for f-spot, it may also be reasonable to simply file bugs for any distribution that has not yet gone to the 2.0 API versions of dbus-sharp.

incorrect README and autoconf will be handled in #33


Error when configuring proxy_host advanced tab

Hey there
Sorry, had no option to reopen the issue I opened before. After completely setting up npmplus afresh (deleting all data) and using the linked config for the advanced tab in proxy_host, i still get a similar error when hovering over "Offline". And the same errors when checking the logs.

 What would be the npmplus container that resembles npm 2.10.4? i might give that a chance... thanks.

I fixed my answer in the discussion